Class: Spotted::Resources::Albums
- Inherits:
-
Object
- Object
- Spotted::Resources::Albums
- Defined in:
- lib/spotted/resources/albums.rb
Instance Method Summary collapse
-
#bulk_retrieve(ids: , market: nil, request_options: {}) ⇒ Spotted::Models::AlbumBulkRetrieveResponse
Some parameter documentations has been truncated, see Models::AlbumBulkRetrieveParams for more details.
-
#initialize(client:) ⇒ Albums
constructor
private
A new instance of Albums.
-
#list_tracks(id, limit: nil, market: nil, offset: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::SimplifiedTrackObject>
Some parameter documentations has been truncated, see Models::AlbumListTracksParams for more details.
-
#retrieve(id, market: nil, request_options: {}) ⇒ Spotted::Models::AlbumRetrieveResponse
Some parameter documentations has been truncated, see Models::AlbumRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ Albums
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Albums.
97 98 99 |
# File 'lib/spotted/resources/albums.rb', line 97 def initialize(client:) @client = client end |
Instance Method Details
#bulk_retrieve(ids: , market: nil, request_options: {}) ⇒ Spotted::Models::AlbumBulkRetrieveResponse
Some parameter documentations has been truncated, see Models::AlbumBulkRetrieveParams for more details.
Get Spotify catalog information for multiple albums identified by their Spotify IDs.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/spotted/resources/albums.rb', line 50 def bulk_retrieve(params) parsed, = Spotted::AlbumBulkRetrieveParams.dump_request(params) @client.request( method: :get, path: "albums", query: parsed, model: Spotted::Models::AlbumBulkRetrieveResponse, options: ) end |
#list_tracks(id, limit: nil, market: nil, offset: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::SimplifiedTrackObject>
Some parameter documentations has been truncated, see Models::AlbumListTracksParams for more details.
Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/spotted/resources/albums.rb', line 82 def list_tracks(id, params = {}) parsed, = Spotted::AlbumListTracksParams.dump_request(params) @client.request( method: :get, path: ["albums/%1$s/tracks", id], query: parsed, page: Spotted::Internal::CursorURLPage, model: Spotted::SimplifiedTrackObject, options: ) end |
#retrieve(id, market: nil, request_options: {}) ⇒ Spotted::Models::AlbumRetrieveResponse
Some parameter documentations has been truncated, see Models::AlbumRetrieveParams for more details.
Get Spotify catalog information for a single album.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/spotted/resources/albums.rb', line 22 def retrieve(id, params = {}) parsed, = Spotted::AlbumRetrieveParams.dump_request(params) @client.request( method: :get, path: ["albums/%1$s", id], query: parsed, model: Spotted::Models::AlbumRetrieveResponse, options: ) end |