Class: SimpleSpotify::Models::Category

Inherits:
Object
  • Object
show all
Defined in:
lib/simplespotify/models/category.rb

Instance Method Summary collapse

Instance Method Details

#playlists(client = nil, country: nil, limit: 20, offset: 0) ⇒ Object



8
9
10
# File 'lib/simplespotify/models/category.rb', line 8

def playlists client=nil, country: nil, limit: 20, offset: 0
  @playlists || playlists!(client, country: country, limit: limit, offset: offset)
end

#playlists!(client = nil, country: nil, limit: 20, offset: 0) ⇒ Object



12
13
14
15
# File 'lib/simplespotify/models/category.rb', line 12

def playlists! client=nil, country: nil, limit: 20, offset: 0
  client ||= SimpleSpotify.default_client
  @playlists = client.category_playlists(id, country: country, limit: limit, offset: offset)
end