Class: Spotted::Resources::Playlists::Images

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Images

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

Parameters:



33
34
35
# File 'lib/spotted/resources/playlists/images.rb', line 33

def initialize(client:)
  @client = client
end

Instance Method Details

#list(playlist_id, request_options: {}) ⇒ Array<Spotted::Models::ImageObject>

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

Get the current image associated with a specific playlist.

Parameters:

  • playlist_id (String)

    The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) of the playli

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

Returns:

See Also:



21
22
23
24
25
26
27
28
# File 'lib/spotted/resources/playlists/images.rb', line 21

def list(playlist_id, params = {})
  @client.request(
    method: :get,
    path: ["playlists/%1$s/images", playlist_id],
    model: Spotted::Internal::Type::ArrayOf[Spotted::ImageObject],
    options: params[:request_options]
  )
end