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