Class: Spotted::Resources::Me::Following
- Inherits:
-
Object
- Object
- Spotted::Resources::Me::Following
- Defined in:
- lib/spotted/resources/me/following.rb
Instance Method Summary collapse
-
#bulk_retrieve(after: nil, limit: nil, type: :artist, request_options: {}) ⇒ Spotted::Models::Me::FollowingBulkRetrieveResponse
Some parameter documentations has been truncated, see Models::Me::FollowingBulkRetrieveParams for more details.
- #check(ids:, type:, request_options: {}) ⇒ Array<Boolean> deprecated Deprecated.
- #follow(ids:, published: nil, request_options: {}) ⇒ nil deprecated Deprecated.
-
#initialize(client:) ⇒ Following
constructor
private
A new instance of Following.
- #unfollow(ids: nil, published: nil, request_options: {}) ⇒ nil deprecated Deprecated.
Constructor Details
#initialize(client:) ⇒ Following
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 Following.
135 136 137 |
# File 'lib/spotted/resources/me/following.rb', line 135 def initialize(client:) @client = client end |
Instance Method Details
#bulk_retrieve(after: nil, limit: nil, type: :artist, request_options: {}) ⇒ Spotted::Models::Me::FollowingBulkRetrieveResponse
Some parameter documentations has been truncated, see Models::Me::FollowingBulkRetrieveParams for more details.
Get the current user’s followed artists.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/spotted/resources/me/following.rb', line 25 def bulk_retrieve(params) parsed, = Spotted::Me::FollowingBulkRetrieveParams.dump_request(params) @client.request( method: :get, path: "me/following", query: parsed, model: Spotted::Models::Me::FollowingBulkRetrieveResponse, options: ) end |
#check(ids:, type:, request_options: {}) ⇒ Array<Boolean>
Some parameter documentations has been truncated, see Models::Me::FollowingCheckParams for more details.
Check to see if the current user is following one or more artists or other Spotify users.
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/following.rb', line 59 def check(params) parsed, = Spotted::Me::FollowingCheckParams.dump_request(params) @client.request( method: :get, path: "me/following/contains", query: parsed, model: Spotted::Internal::Type::ArrayOf[Spotted::Internal::Type::Boolean], options: ) end |
#follow(ids:, published: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Me::FollowingFollowParams for more details.
Add the current user as a follower of one or more artists or other Spotify users.
Note: This endpoint is deprecated. Use [Save Items to Library](/documentation/web-api/reference/save-library-items) instead.
93 94 95 96 |
# File 'lib/spotted/resources/me/following.rb', line 93 def follow(params) parsed, = Spotted::Me::FollowingFollowParams.dump_request(params) @client.request(method: :put, path: "me/following", body: parsed, model: NilClass, options: ) end |
#unfollow(ids: nil, published: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Me::FollowingUnfollowParams for more details.
Remove the current user as a follower of one or more artists or other Spotify users.
Note: This endpoint is deprecated. Use [Remove Items from Library](/documentation/web-api/reference/remove-library-items) instead.
121 122 123 124 125 126 127 128 129 130 |
# File 'lib/spotted/resources/me/following.rb', line 121 def unfollow(params = {}) parsed, = Spotted::Me::FollowingUnfollowParams.dump_request(params) @client.request( method: :delete, path: "me/following", body: parsed, model: NilClass, options: ) end |