pyfmframework/fmframework/model/artist.py

30 lines
988 B
Python
Raw Normal View History

2019-10-08 18:57:42 +01:00
from typing import List
2019-10-03 19:06:44 +01:00
from fmframework.util.console import Color
2019-10-08 18:57:42 +01:00
from fmframework.model.fm import LastFM, Wiki, Image
2019-10-03 19:06:44 +01:00
class Artist(LastFM):
def __init__(self,
name: str,
url: str = None,
mbid: str = None,
listeners: int = None,
play_count: int = None,
user_scrobbles: int = None,
2019-10-08 18:57:42 +01:00
wiki: Wiki = None,
images: List[Image] = None):
2019-10-03 19:06:44 +01:00
super().__init__(name=name,
url=url,
mbid=mbid,
listeners=listeners,
play_count=play_count,
user_scrobbles=user_scrobbles,
2019-10-08 18:57:42 +01:00
wiki=wiki,
images=images)
2019-10-03 19:06:44 +01:00
def __str__(self):
return f'{self.name}'
def __repr__(self):
return Color.PURPLE + Color.BOLD + 'Artist' + Color.END + f': {self.name} ' + super().__repr__()