Exspotify.Structs.PlaybackState (Exspotify v0.1.0)

View Source

Represents the current playback state from Spotify API. Contains information about the device, track, context, and playback controls.

Summary

Functions

Creates a PlaybackState struct from a map.

Types

t()

@type t() :: %Exspotify.Structs.PlaybackState{
  actions: Exspotify.Structs.Actions.t() | nil,
  context: Exspotify.Structs.Context.t() | nil,
  currently_playing_type: String.t() | nil,
  device: Exspotify.Structs.Device.t() | nil,
  is_playing: boolean() | nil,
  item: Exspotify.Structs.Track.t() | Exspotify.Structs.Episode.t() | nil,
  progress_ms: integer() | nil,
  repeat_state: String.t() | nil,
  shuffle_state: boolean() | nil,
  timestamp: integer() | nil
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Creates a PlaybackState struct from a map.