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>
Some parameter documentations has been truncated, see Models::Me::FollowingCheckParams for more details.
-
#follow(ids:, published: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Me::FollowingFollowParams for more details.
-
#initialize(client:) ⇒ Following
constructor
private
A new instance of Following.
-
#unfollow(ids: nil, published: nil, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Me::FollowingUnfollowParams for more details.
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.
117 118 119 |
# File 'lib/spotted/resources/me/following.rb', line 117 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.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/spotted/resources/me/following.rb', line 53 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.
81 82 83 84 |
# File 'lib/spotted/resources/me/following.rb', line 81 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.
103 104 105 106 107 108 109 110 111 112 |
# File 'lib/spotted/resources/me/following.rb', line 103 def unfollow(params = {}) parsed, = Spotted::Me::FollowingUnfollowParams.dump_request(params) @client.request( method: :delete, path: "me/following", body: parsed, model: NilClass, options: ) end |