def init(self, api, name = None, artist = None, id = None, mbid = None, url = None, releaseDate = None, image = None, stats = None, topTags = None): if not isinstance(api, Api): raise LastfmInvalidParametersError("api reference must be supplied as an argument") Taggable.init(self, api) self.__api = api self.__name = name self.__artist = artist self.__id = id self.__mbid = mbid self.__url = url self.__releaseDate = releaseDate self.__image = image self.__stats = stats and Stats( subject = self, listeners = stats.listeners, playcount = stats.playcount, match = stats.match, rank = stats.rank ) self.__topTags = topTags
def init(self, api, name = None, mbid = None, url = None, duration = None, streamable = None, fullTrack = None, artist = None, album = None, position = None, image = None, stats = None, playedOn = None, lovedOn = None, wiki = None): if not isinstance(api, Api): raise LastfmInvalidParametersError("api reference must be supplied as an argument") Taggable.init(self, api) Sharable.init(self, api) self.__api = api self.__id = id self.__name = name self.__mbid = mbid self.__url = url self.__duration = duration self.__streamable = streamable self.__fullTrack = fullTrack self.__artist = artist self.__album = album self.__position = position self.__image = image self.__stats = stats and Stats( subject = self, match = stats.match, playcount = stats.playcount, rank = stats.rank, listeners = stats.listeners, ) self.__playedOn = playedOn self.__lovedOn = lovedOn self.__wiki = wiki and Wiki( subject = self, published = wiki.published, summary = wiki.summary, content = wiki.content )
def init(self, api, name = None, mbid = None, url = None, image = None, streamable = None, stats = None, similar = None, topTags = None, bio = None): if not isinstance(api, Api): raise LastfmInvalidParametersError("api reference must be supplied as an argument") Taggable.init(self, api) Sharable.init(self, api) self.__api = api self.__name = name self.__mbid = mbid self.__url = url self.__image = image self.__streamable = streamable self.__stats = stats and Stats( subject = self, listeners = stats.listeners, playcount = stats.playcount, match = stats.match, rank = stats.rank ) self.__similar = similar self.__topTags = topTags self.__bio = bio and Wiki( subject = self, published = bio.published, summary = bio.summary, content = bio.content )
def __init__(self, parent=None, key_name=None, app=None, **entity_values): db.Model.__init__(self, parent, key_name, app, **entity_values) Taggable.__init__(self)
def __init__(self, parent=None, key_name=None, app=None, **entity_values): """初始化,主要用于初始化Taggable。""" BaseModel.__init__(self, parent, key_name, app, **entity_values) Taggable.__init__(self)
def __init__(self, name, tags=[]): """Initialize new instance of Actor.""" Taggable.__init__(self, tags) self.name = name
def __init__(self, parent=None, key_name=None, app=None, **entity_values): Entity.__init__(self, parent, key_name, app, **entity_values) Taggable.__init__(self)