python-lastfm/src/tasteometer.py

44 lines
1.0 KiB
Python
Raw Normal View History

2008-07-10 22:25:05 +05:30
#!/usr/bin/env python
__author__ = "Abhinav Sarkar"
__version__ = "0.1"
__license__ = "GNU Lesser General Public License"
class Tasteometer(object):
"""A class representing a tasteometer."""
def __init__(self,
score = None,
matches = None,
artists = None):
self.__score = score
self.__matches = matches
2008-07-15 00:38:39 +05:30
self.__artists = artists#set
2008-07-10 22:25:05 +05:30
@property
def score(self):
"""score of the comparison"""
2008-07-10 22:25:05 +05:30
return self.__score
@property
def matches(self):
"""matches for the comparison"""
2008-07-10 22:25:05 +05:30
return self.__matches
@property
def artists(self):
"""artists for the comparison"""
2008-07-10 22:25:05 +05:30
return self.__artists
@staticmethod
def compare(api,
type1, type2,
value1, value2,
limit = None):
pass
2008-07-15 00:38:39 +05:30
def __repr__(self):
return "<lastfm.Tasteometer>"
2008-07-10 22:25:05 +05:30
from artist import Artist
from error import LastfmError