Class: Spotted::Resources::Users

Inherits:
Object
  • Object
show all
Defined in:
lib/spotted/resources/users.rb,
lib/spotted/resources/users/playlists.rb

Defined Under Namespace

Classes: Playlists

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Users

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 Users.

Parameters:



35
36
37
38
# File 'lib/spotted/resources/users.rb', line 35

def initialize(client:)
  @client = client
  @playlists = Spotted::Resources::Users::Playlists.new(client: client)
end

Instance Attribute Details

#playlistsSpotted::Resources::Users::Playlists (readonly)



7
8
9
# File 'lib/spotted/resources/users.rb', line 7

def playlists
  @playlists
end

Instance Method Details

#retrieve_profile(user_id, request_options: {}) ⇒ Spotted::Models::UserRetrieveProfileResponse

Some parameter documentations has been truncated, see Models::UserRetrieveProfileParams for more details.

Get public profile information about a Spotify user.

Parameters:

  • user_id (String)

    The user’s [Spotify user ID](/documentation/web-api/concepts/spotify-uris-ids).

  • request_options (Spotted::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



23
24
25
26
27
28
29
30
# File 'lib/spotted/resources/users.rb', line 23

def retrieve_profile(user_id, params = {})
  @client.request(
    method: :get,
    path: ["users/%1$s", user_id],
    model: Spotted::Models::UserRetrieveProfileResponse,
    options: params[:request_options]
  )
end