Class: Spotify::UsersResource
Instance Attribute Summary
Attributes inherited from Resource
#client
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
3
4
5
6
|
# File 'lib/spotify/resources/users.rb', line 3
def get(id:)
response = get_request("users/#{id}")
User.new response.body
end
|
#playlists(id:, **params) ⇒ Object
8
9
10
11
|
# File 'lib/spotify/resources/users.rb', line 8
def playlists(id:, **params)
response = get_request("users/#{id}/playlists", params: params)
Collection.from_response(response, type: Playlist, key: "items")
end
|