Class: Spotted::Models::Me::PlayerStartPlaybackParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/spotted/models/me/player_start_playback_params.rb

Overview

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(device_id: nil, context_uri: nil, offset: nil, position_ms: nil, uris: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Spotted::Models::Me::PlayerStartPlaybackParams for more details.

Parameters:

  • device_id (String) (defaults to: nil)

    The id of the device this command is targeting. If not supplied, the user’s curr

  • context_uri (String) (defaults to: nil)

    Optional. Spotify URI of the context to play.

  • offset (Hash{Symbol=>Object}) (defaults to: nil)

    Optional. Indicates from where in the context playback should start. Only availa

  • position_ms (Integer) (defaults to: nil)

    Indicates from what position to start playback. Must be a positive number. Passi

  • uris (Array<String>) (defaults to: nil)

    Optional. A JSON array of the Spotify track URIs to play.

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


# File 'lib/spotted/models/me/player_start_playback_params.rb', line 50

Instance Attribute Details

#context_uriString?

Optional. Spotify URI of the context to play. Valid contexts are albums, artists & playlists. ‘context_uri:“spotify:album:1Je1IMUlBXcx1Fz0WE7oPT”`

Returns:

  • (String, nil)


23
# File 'lib/spotted/models/me/player_start_playback_params.rb', line 23

optional :context_uri, String

#device_idString?

The id of the device this command is targeting. If not supplied, the user’s currently active device is the target.

Returns:

  • (String, nil)


16
# File 'lib/spotted/models/me/player_start_playback_params.rb', line 16

optional :device_id, String

#offsetHash{Symbol=>Object}?

Optional. Indicates from where in the context playback should start. Only available when context_uri corresponds to an album or playlist object “position” is zero based and can’t be negative. Example: ‘“offset”: 5` “uri” is a string representing the uri of the item to start at. Example: `“offset”: “spotify:track:1301WleyT98MSxVHPZCA6M”`

Returns:

  • (Hash{Symbol=>Object}, nil)


33
# File 'lib/spotted/models/me/player_start_playback_params.rb', line 33

optional :offset, Spotted::Internal::Type::HashOf[Spotted::Internal::Type::Unknown]

#position_msInteger?

Indicates from what position to start playback. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song.

Returns:

  • (Integer, nil)


41
# File 'lib/spotted/models/me/player_start_playback_params.rb', line 41

optional :position_ms, Integer

#urisArray<String>?

Optional. A JSON array of the Spotify track URIs to play. For example: ‘[“spotify:track:4iV5W9uYEdYUVa79Axb7Rh”, “spotify:track:1301WleyT98MSxVHPZCA6M”]`

Returns:

  • (Array<String>, nil)


48
# File 'lib/spotted/models/me/player_start_playback_params.rb', line 48

optional :uris, Spotted::Internal::Type::ArrayOf[String]