1
2
3 __author__ = "Abhinav Sarkar <abhinav@abhinavsarkar.net>"
4 __version__ = "0.2"
5 __license__ = "GNU Lesser General Public License"
8 """A class representing the stats of an artist."""
9 - def __init__(self,
10 subject,
11 listeners = None,
12 playcount = None,
13 tagcount = None,
14 count = None,
15 match = None,
16 rank = None,
17 weight = None,
18 attendance = None,
19 reviews = None,):
30
31 @property
33 """subject of the stats"""
34 return self._subject
35
36 @property
38 """rank of the subject"""
39 return self._rank
40
41 @property
43 """number of listeners of the subject"""
44 return self._listeners
45
46 @property
48 """playcount of the subject"""
49 return self._playcount
50
51 @property
53 """tagcount of the subject"""
54 return self._tagcount
55
56 @property
58 """count of the subject"""
59 return self._count
60
61 @property
63 """match of the subject"""
64 return self._match
65
66 @property
68 """weight of the subject"""
69 return self._weight
70
71 @property
73 """attendance of the subject"""
74 return self._attendance
75
76 @property
78 """reviews of the subject"""
79 return self._reviews
80
82 if hasattr(self._subject, 'name'):
83 return "<lastfm.Stats: for '%s'>" % self._subject.name
84 else:
85 return "<lastfm.Stats: for '%s'>" % self._subject
86