Class: Spotted::Resources::Me::Top
- Inherits:
-
Object
- Object
- Spotted::Resources::Me::Top
- Defined in:
- lib/spotted/resources/me/top.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Top
constructor
private
A new instance of Top.
-
#list_top_artists(limit: nil, offset: nil, time_range: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::ArtistObject>
Some parameter documentations has been truncated, see Models::Me::TopListTopArtistsParams for more details.
-
#list_top_tracks(limit: nil, offset: nil, time_range: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::TrackObject>
Some parameter documentations has been truncated, see Models::Me::TopListTopTracksParams for more details.
Constructor Details
#initialize(client:) ⇒ Top
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 Top.
70 71 72 |
# File 'lib/spotted/resources/me/top.rb', line 70 def initialize(client:) @client = client end |
Instance Method Details
#list_top_artists(limit: nil, offset: nil, time_range: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::ArtistObject>
Some parameter documentations has been truncated, see Models::Me::TopListTopArtistsParams for more details.
Get the current user’s top artists based on calculated affinity.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/spotted/resources/me/top.rb', line 25 def list_top_artists(params = {}) parsed, = Spotted::Me::TopListTopArtistsParams.dump_request(params) @client.request( method: :get, path: "me/top/artists", query: parsed, page: Spotted::Internal::CursorURLPage, model: Spotted::ArtistObject, options: ) end |
#list_top_tracks(limit: nil, offset: nil, time_range: nil, request_options: {}) ⇒ Spotted::Internal::CursorURLPage<Spotted::Models::TrackObject>
Some parameter documentations has been truncated, see Models::Me::TopListTopTracksParams for more details.
Get the current user’s top tracks based on calculated affinity.
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/spotted/resources/me/top.rb', line 55 def list_top_tracks(params = {}) parsed, = Spotted::Me::TopListTopTracksParams.dump_request(params) @client.request( method: :get, path: "me/top/tracks", query: parsed, page: Spotted::Internal::CursorURLPage, model: Spotted::TrackObject, options: ) end |