spotify.v1.browse.featured_playlist module
from spotify import values
from spotify.resource import Instance, Resource
class FeaturedPlaylistInstance(Instance):
@property
def message(self):
return self.property('message')
@property
def playlists(self):
from spotify.v1.user.playlist import PlaylistPage
return PlaylistPage(self.version, self.property('playlists'), 'items')
class FeaturedPlaylistContext(Resource):
def fetch(self, locale=values.UNSET, country=values.UNSET, timestamp=values.UNSET,
limit=values.UNSET, offset=values.UNSET):
params = values.of({
'locale': locale,
'country': country,
'timestamp': timestamp,
'limit': limit,
'offset': offset
})
response = self.version.request('GET', '/browse/featured-playlists', params=params)
return FeaturedPlaylistInstance(self.version, response.json())
Classes
class FeaturedPlaylistContext
class FeaturedPlaylistContext(Resource):
def fetch(self, locale=values.UNSET, country=values.UNSET, timestamp=values.UNSET,
limit=values.UNSET, offset=values.UNSET):
params = values.of({
'locale': locale,
'country': country,
'timestamp': timestamp,
'limit': limit,
'offset': offset
})
response = self.version.request('GET', '/browse/featured-playlists', params=params)
return FeaturedPlaylistInstance(self.version, response.json())
Ancestors (in MRO)
- FeaturedPlaylistContext
- spotify.resource.Resource
- __builtin__.object
Methods
def __init__(
self, version)
def __init__(self, version):
self.version = version
def fetch(
self, locale='UNSET', country='UNSET', timestamp='UNSET', limit='UNSET', offset='UNSET')
def fetch(self, locale=values.UNSET, country=values.UNSET, timestamp=values.UNSET,
limit=values.UNSET, offset=values.UNSET):
params = values.of({
'locale': locale,
'country': country,
'timestamp': timestamp,
'limit': limit,
'offset': offset
})
response = self.version.request('GET', '/browse/featured-playlists', params=params)
return FeaturedPlaylistInstance(self.version, response.json())
class FeaturedPlaylistInstance
class FeaturedPlaylistInstance(Instance):
@property
def message(self):
return self.property('message')
@property
def playlists(self):
from spotify.v1.user.playlist import PlaylistPage
return PlaylistPage(self.version, self.property('playlists'), 'items')
Ancestors (in MRO)
- FeaturedPlaylistInstance
- spotify.resource.Instance
- spotify.resource.Resource
- __builtin__.object
Instance variables
var message
var playlists
Methods
def __init__(
self, version, properties)
def __init__(self, version, properties):
super(Instance, self).__init__(version)
self.properties = properties
def property(
self, name, default=None)
def property(self, name, default=None):
return self.properties.get(name, default)