Class: Spotted::Resources::Me::Albums
- Inherits:
-
Object
- Object
- Spotted::Resources::Me::Albums
- Defined in:
- lib/spotted/resources/me/albums.rb
Instance Method Summary collapse
- #check(ids:, request_options: {}) ⇒ Array<Boolean> deprecated Deprecated.
-
#initialize(client:) ⇒ Albums
constructor
private
A new instance of Albums.
-
#list(limit: nil, market: nil, offset: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::Me::AlbumListResponse>
Some parameter documentations has been truncated, see Models::Me::AlbumListParams for more details.
- #remove(ids: nil, published: nil, request_options: {}) ⇒ nil deprecated Deprecated.
- #save(ids: nil, published: nil, request_options: {}) ⇒ nil deprecated Deprecated.
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.
127 128 129 |
# File 'lib/spotted/resources/me/albums.rb', line 127 def initialize(client:) @client = client end |
Instance Method Details
#check(ids:, request_options: {}) ⇒ Array<Boolean>
Some parameter documentations has been truncated, see Models::Me::AlbumCheckParams for more details.
Check if one or more albums is already saved in the current Spotify user’s ‘Your Music’ library.
Note: This endpoint is deprecated. Use [Check User’s Saved Items](/documentation/web-api/reference/check-library-contains) instead.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/spotted/resources/me/albums.rb', line 59 def check(params) parsed, = Spotted::Me::AlbumCheckParams.dump_request(params) @client.request( method: :get, path: "me/albums/contains", query: parsed, model: Spotted::Internal::Type::ArrayOf[Spotted::Internal::Type::Boolean], options: ) end |
#list(limit: nil, market: nil, offset: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::Me::AlbumListResponse>
Some parameter documentations has been truncated, see Models::Me::AlbumListParams for more details.
Get a list of the albums saved in the current Spotify user’s ‘Your Music’ library.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/spotted/resources/me/albums.rb', line 26 def list(params = {}) parsed, = Spotted::Me::AlbumListParams.dump_request(params) @client.request( method: :get, path: "me/albums", query: parsed, page: Spotted::Internal::CursorURLPage, model: Spotted::Models::Me::AlbumListResponse, options: ) end |
#remove(ids: nil, published: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Me::AlbumRemoveParams for more details.
Remove one or more albums from the current user’s ‘Your Music’ library.
Note: This endpoint is deprecated. Use [Remove Items from Library](/documentation/web-api/reference/remove-library-items) instead.
92 93 94 95 |
# File 'lib/spotted/resources/me/albums.rb', line 92 def remove(params = {}) parsed, = Spotted::Me::AlbumRemoveParams.dump_request(params) @client.request(method: :delete, path: "me/albums", body: parsed, model: NilClass, options: ) end |
#save(ids: nil, published: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Me::AlbumSaveParams for more details.
Save one or more albums to the current user’s ‘Your Music’ library.
Note: This endpoint is deprecated. Use [Save Items to Library](/documentation/web-api/reference/save-library-items) instead.
119 120 121 122 |
# File 'lib/spotted/resources/me/albums.rb', line 119 def save(params = {}) parsed, = Spotted::Me::AlbumSaveParams.dump_request(params) @client.request(method: :put, path: "me/albums", body: parsed, model: NilClass, options: ) end |