Struct spotify::status::SpotifyStatus
[−]
[src]
pub struct SpotifyStatus {
pub volume: f32,
pub online: bool,
pub version: i32,
pub running: bool,
pub playing: bool,
pub shuffle: bool,
pub server_time: i64,
pub play_enabled: bool,
pub prev_enabled: bool,
pub next_enabled: bool,
pub client_version: String,
pub playing_position: f32,
pub open_graph_state: OpenGraphState,
pub track: Track,
}A Spotify status.
Fields
volume: f32
The volume. Valid values are [0.0...1.0].
online: bool
Whether the client is online.
version: i32
The protocol version.
running: bool
Whether the client is running.
playing: bool
Whether a track is currently playing.
shuffle: bool
Whether shuffle mode is activated.
server_time: i64
The server time as a unix timestamp.
play_enabled: bool
Whether playing a track is enabled.
prev_enabled: bool
Whether playing the previous track is enabled.
next_enabled: bool
Whether playing the next track is enabled.
client_version: String
The client version.
playing_position: f32
The current playing position.
open_graph_state: OpenGraphState
The Open Graph state.
track: Track
The currently playing track.
Methods
impl SpotifyStatus[src]
Implements SpotifyStatus.
fn track(&self) -> SimpleTrack
Gets an easy-to-work-with abstraction over the currently playing track, containing only the names of the track, album and artist.
fn version(&self) -> String
Gets the Spotify client version.
Trait Implementations
impl From<JsonValue> for SpotifyStatus[src]
Implements From<JsonValue> for SpotifyStatus.
fn from(json: JsonValue) -> SpotifyStatus
Performs the conversion.