Method: RSpotify::Category#playlists
- Defined in:
- lib/rspotify/category.rb
#playlists(limit: 20, offset: 0, **options) ⇒ Array<Playlist>
Get a list of Spotify playlists tagged with a particular category.
89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/rspotify/category.rb', line 89 def playlists(limit: 20, offset: 0, **) url = "browse/categories/#{@id}/playlists"\ "?limit=#{limit}&offset=#{offset}" .each do |option, value| url << "&#{option}=#{value}" end response = RSpotify.get(url) return response if RSpotify.raw_response response['playlists']['items'].map { |i| Playlist.new i } end |