Class: Spotted::Resources::Playlists::Followers
- Inherits:
-
Object
- Object
- Spotted::Resources::Playlists::Followers
- Defined in:
- lib/spotted/resources/playlists/followers.rb
Instance Method Summary collapse
- #check(playlist_id, ids: nil, request_options: {}) ⇒ Array<Boolean> deprecated Deprecated.
- #follow(playlist_id, published: nil, request_options: {}) ⇒ nil deprecated Deprecated.
-
#initialize(client:) ⇒ Followers
constructor
private
A new instance of Followers.
- #unfollow(playlist_id, request_options: {}) ⇒ nil deprecated Deprecated.
Constructor Details
#initialize(client:) ⇒ Followers
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 Followers.
105 106 107 |
# File 'lib/spotted/resources/playlists/followers.rb', line 105 def initialize(client:) @client = client end |
Instance Method Details
#check(playlist_id, ids: nil, request_options: {}) ⇒ Array<Boolean>
Some parameter documentations has been truncated, see Models::Playlists::FollowerCheckParams for more details.
Check to see if the current user is following a specified playlist.
Note: This endpoint is deprecated. Use [Check User’s Saved Items](/documentation/web-api/reference/check-library-contains) instead.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/spotted/resources/playlists/followers.rb', line 29 def check(playlist_id, params = {}) parsed, = Spotted::Playlists::FollowerCheckParams.dump_request(params) @client.request( method: :get, path: ["playlists/%1$s/followers/contains", playlist_id], query: parsed, model: Spotted::Internal::Type::ArrayOf[Spotted::Internal::Type::Boolean], options: ) end |
#follow(playlist_id, published: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Playlists::FollowerFollowParams for more details.
Add the current user as a follower of a playlist.
Note: This endpoint is deprecated. Use [Save Items to Library](/documentation/web-api/reference/save-library-items) instead.
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/spotted/resources/playlists/followers.rb', line 62 def follow(playlist_id, params = {}) parsed, = Spotted::Playlists::FollowerFollowParams.dump_request(params) @client.request( method: :put, path: ["playlists/%1$s/followers", playlist_id], body: parsed, model: NilClass, options: ) end |
#unfollow(playlist_id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Playlists::FollowerUnfollowParams for more details.
Remove the current user as a follower of a playlist.
Note: This endpoint is deprecated. Use [Remove Items from Library](/documentation/web-api/reference/remove-library-items) instead.
93 94 95 96 97 98 99 100 |
# File 'lib/spotted/resources/playlists/followers.rb', line 93 def unfollow(playlist_id, params = {}) @client.request( method: :delete, path: ["playlists/%1$s/followers", playlist_id], model: NilClass, options: params[:request_options] ) end |