Class: Spotted::Models::Me::PlayerGetCurrentlyPlayingResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/spotted/models/me/player_get_currently_playing_response.rb

Overview

Defined Under Namespace

Modules: Item Classes: Actions

Instance Attribute Summary collapse

Instance Method Summary collapse

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(interrupting_playback: nil, pausing: nil, resuming: nil, seeking: nil, skipping_next: nil, skipping_prev: nil, toggling_repeat_context: nil, toggling_repeat_track: nil, toggling_shuffle: nil, transferring_playback: nil) ⇒ Object

Allows to update the user interface based on which playback actions are available within the current context.

Parameters:

  • interrupting_playback (Boolean) (defaults to: nil)

    Interrupting playback. Optional field.

  • pausing (Boolean) (defaults to: nil)

    Pausing. Optional field.

  • resuming (Boolean) (defaults to: nil)

    Resuming. Optional field.

  • seeking (Boolean) (defaults to: nil)

    Seeking playback location. Optional field.

  • skipping_next (Boolean) (defaults to: nil)

    Skipping to the next context. Optional field.

  • skipping_prev (Boolean) (defaults to: nil)

    Skipping to the previous context. Optional field.

  • toggling_repeat_context (Boolean) (defaults to: nil)

    Toggling repeat context flag. Optional field.

  • toggling_repeat_track (Boolean) (defaults to: nil)

    Toggling repeat track flag. Optional field.

  • toggling_shuffle (Boolean) (defaults to: nil)

    Toggling shuffle flag. Optional field.

  • transferring_playback (Boolean) (defaults to: nil)

    Transfering playback between devices. Optional field.



# File 'lib/spotted/models/me/player_get_currently_playing_response.rb', line 52

Instance Attribute Details

#actionsSpotted::Models::Me::PlayerGetCurrentlyPlayingResponse::Actions?

Allows to update the user interface based on which playback actions are available within the current context.



13
# File 'lib/spotted/models/me/player_get_currently_playing_response.rb', line 13

optional :actions, -> { Spotted::Models::Me::PlayerGetCurrentlyPlayingResponse::Actions }

#contextSpotted::Models::Me::ContextObject?

A Context Object. Can be ‘null`.



19
# File 'lib/spotted/models/me/player_get_currently_playing_response.rb', line 19

optional :context, -> { Spotted::Me::ContextObject }

#currently_playing_typeString?

The object type of the currently playing item. Can be one of ‘track`, `episode`, `ad` or `unknown`.

Returns:

  • (String, nil)


26
# File 'lib/spotted/models/me/player_get_currently_playing_response.rb', line 26

optional :currently_playing_type, String

#is_playingBoolean?

If something is currently playing, return ‘true`.

Returns:

  • (Boolean, nil)


32
# File 'lib/spotted/models/me/player_get_currently_playing_response.rb', line 32

optional :is_playing, Spotted::Internal::Type::Boolean

#itemSpotted::Models::TrackObject, ...

The currently playing track or episode. Can be ‘null`.



38
# File 'lib/spotted/models/me/player_get_currently_playing_response.rb', line 38

optional :item, union: -> { Spotted::Models::Me::PlayerGetCurrentlyPlayingResponse::Item }

#progress_msInteger?

Progress into the currently playing track or episode. Can be ‘null`.

Returns:

  • (Integer, nil)


44
# File 'lib/spotted/models/me/player_get_currently_playing_response.rb', line 44

optional :progress_ms, Integer

#timestampInteger?

Unix Millisecond Timestamp when data was fetched

Returns:

  • (Integer, nil)


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

optional :timestamp, Integer