EHS
ehs::Spotify Class Referencefinal

#include <Spotify.h>

Public Member Functions

virtual ~Spotify ()
 
 Spotify ()
 
 Spotify (Str_8 clientId, Str_8 secret, Str_8 redURI, Array< Str_8 > scopes, bool forceVerify)
 
bool Authorize ()
 
UInt_32 SetVolume (UInt_8 level)
 
UInt_32 Play ()
 
UInt_32 Pause ()
 
UInt_32 SetRepeat (SpotifyState state)
 
UInt_32 SetShuffle (bool state)
 
UInt_32 SearchTrack (Vector< Str_8 > &artists, Str_8 &id, Str_8 &name)
 
UInt_32 GetPlayingTrack (Vector< Str_8 > &artists, Str_8 &id, Str_8 &name)
 
UInt_32 GetQueue (Array< Track > &tracks)
 
UInt_32 QueueTrack (const Str_8 &id)
 
UInt_32 AddTracks (const Str_8 &playlistId, const Array< Str_8 > &trackIds, const UInt_32 pos=0)
 
UInt_32 AddTrack (const Str_8 &playlistId, const Str_8 &trackId, const UInt_32 pos=0)
 
UInt_32 Skip ()
 
UInt_32 Previous ()
 
UInt_32 Seek (UInt_32 pos)
 
Str_8 GetClientId () const
 
Str_8 GetSecret () const
 
Str_8 GetRedURI () const
 
bool IsVerificationForced () const
 
bool IsActive () const
 

Static Public Attributes

static const Str_8 trackUriPrefix = "https://open.spotify.com/track/"
 

Constructor & Destructor Documentation

◆ ~Spotify()

ehs::Spotify::~Spotify ( )
virtual

◆ Spotify() [1/2]

ehs::Spotify::Spotify ( )

◆ Spotify() [2/2]

ehs::Spotify::Spotify ( Str_8  clientId,
Str_8  secret,
Str_8  redURI,
Array< Str_8 scopes,
bool  forceVerify 
)

Member Function Documentation

◆ AddTrack()

UInt_32 ehs::Spotify::AddTrack ( const Str_8 playlistId,
const Str_8 trackId,
const UInt_32  pos = 0 
)

◆ AddTracks()

UInt_32 ehs::Spotify::AddTracks ( const Str_8 playlistId,
const Array< Str_8 > &  trackIds,
const UInt_32  pos = 0 
)

◆ Authorize()

bool ehs::Spotify::Authorize ( )

◆ GetClientId()

Str_8 ehs::Spotify::GetClientId ( ) const

◆ GetPlayingTrack()

UInt_32 ehs::Spotify::GetPlayingTrack ( Vector< Str_8 > &  artists,
Str_8 id,
Str_8 name 
)

◆ GetQueue()

UInt_32 ehs::Spotify::GetQueue ( Array< Track > &  tracks)

◆ GetRedURI()

Str_8 ehs::Spotify::GetRedURI ( ) const

◆ GetSecret()

Str_8 ehs::Spotify::GetSecret ( ) const

◆ IsActive()

bool ehs::Spotify::IsActive ( ) const

◆ IsVerificationForced()

bool ehs::Spotify::IsVerificationForced ( ) const

◆ Pause()

UInt_32 ehs::Spotify::Pause ( )

Pauses playback for a device.

Returns
The response code.

◆ Play()

UInt_32 ehs::Spotify::Play ( )

Resume playback for a device.

Returns
The response code.

◆ Previous()

UInt_32 ehs::Spotify::Previous ( )

Skips to the previous track.

Returns
The response code.

◆ QueueTrack()

UInt_32 ehs::Spotify::QueueTrack ( const Str_8 id)

Adds a track to the queue for a device.

Parameters
[in]uriThe track id to add.
Returns
The response code.

◆ SearchTrack()

UInt_32 ehs::Spotify::SearchTrack ( Vector< Str_8 > &  artists,
Str_8 id,
Str_8 name 
)

◆ Seek()

UInt_32 ehs::Spotify::Seek ( UInt_32  pos)

Seeks to a position of the currently playing track in milliseconds.

Parameters
[in]posThe position in milliseconds to seek to.
Returns
The response code.

◆ SetRepeat()

UInt_32 ehs::Spotify::SetRepeat ( SpotifyState  state)

Repeats playback for a device.

Parameters
[in]statusThe status to set it to.
Returns
The response code.

◆ SetShuffle()

UInt_32 ehs::Spotify::SetShuffle ( bool  state)

Shuffles playback for a device.

Parameters
[in]stateThe state to set shuffle to.
Returns
The response code.

◆ SetVolume()

UInt_32 ehs::Spotify::SetVolume ( UInt_8  level)

Sets the volume for a device.

Parameters
[in]levelThe percentage to set the volume to.
Returns
The response code.

◆ Skip()

UInt_32 ehs::Spotify::Skip ( )

Skips to the next track.

Returns
The response code.

Member Data Documentation

◆ trackUriPrefix

const Str_8 ehs::Spotify::trackUriPrefix = "https://open.spotify.com/track/"
static

The documentation for this class was generated from the following files: