Source code for asyncspotify.object

[docs]class SpotifyObject: ''' Represents a generic Spotify Object. Attributes ---------- id: str Spotify ID of the object. name: str Name of the object. uri: str Spotify URI of the object. ''' _type = None def __init__(self, client, data): self._client = client = data.pop('id', None) = data.pop('name', None) self.href = data.pop('href', None) self.uri = data.pop('uri', None) @property def type(self): return self._type def __eq__(self, other): return == def __ne__(self, other): return not self.__eq__(other) def __repr__(self): repr = self.__class__.__name__ if is not None: repr += ' id=\'{}\''.format( if is not None: repr += ' name=\'{}\''.format( return '<%s>' % repr