🔉 A Client for the Spotify Web API, written in C#/.NET
Go to file
2014-04-03 13:01:40 +02:00
ILMerge Changed compile input and output 2014-02-13 18:54:14 +01:00
SpotifyAPI Reset Buildpath | Removed DLL in main Folder | Made a 5000ms delay for Spotify to run 2014-02-17 13:03:00 +01:00
SpotifyAPI_Example Forgot to translate, fixed now. 2014-02-18 18:10:23 +01:00
.gitattributes Initialisieren Sie das Commit, um ".gitIgnore"- und ".gitAttribute"-Standarddateien hinzuzufügen. 2014-01-07 16:25:32 +01:00
.gitignore Initial commit 2014-01-28 12:01:07 -08:00
LICENSE Initial commit 2014-01-28 12:01:07 -08:00
Newtonsoft.Json.dll Added Files 2014-02-01 13:52:33 +01:00
nircmd.dll Added Files 2014-02-01 13:52:33 +01:00
README.md Updated and added missing stuff to the README.md 2014-04-03 13:01:40 +02:00
SpotifyAPI.sln Added Files 2014-02-01 13:52:33 +01:00

SpotifyAPI-NET

An API for the Spotify-Client, written in .NET
Look at the example provided in the Repo

Following 3 files will be needed for all features:

  • SpotifyAPI.dll
  • Newtonsoft.Json.dll (Will be merged into SpotifyAPI.dll in the official Releases using ILMerge)
  • nircmd.dll (Used to Mute & UnMute Spotify)

Screenshot of the Example: alt text

Usage:

SpotifyAPI

#####Boolean Connect()

Connects the SpotifyAPI to the Spotify Client (Needs to be called before making calls, Spotify has to run)
Returns true if it was successful

#####void Update()

Updates Information about Tracks etc.

#####void RunSpotify()

Runs Spotify (Client has to run for API Calls)

#####void RunSpotifyWebHelper()

Runs SpotifyWebHelper (Client has to run for API Calls)

#####static Boolean IsSpotifyRunning()

Returns true, if Spotify is running

#####static Boolean IsSpotifyWebHelperRunning()

Returns true, if SpotifyWebHelper is running

#####static Boolean IsValidSpotifyURL(String SpotifyURL)

Returns true, if the provided Spotify URL is working (Not working yet)

#####SpotifyMusicHandler GetMusicHandler()

Returns the MusicHandler

#####SpotifyEventHandler GetEventHandler()

Returns the EventHandler

SpotifyMusicHandler

#####void Play()

Play "button"

#####void Pause()

Pause "button"

#####void Skip()

Skip Track

#####void Previous()

Previous Track

#####void PlayURL(String SpotifyURI)

Plays the provided URI

#####double GetVolume()

Returns the current volume (0.00 - 1.00)

#####Boolean IsAdRunning()

Returns true, if an AD is running

#####double GetTrackPostion()

Returns the current position of the Track

#####void Mute()

Mutes Spotify (Requires nircmd.dll)

#####void UnMute()

Unmutes Spotify (Requires nircmd.dll

#####Boolean IsPlaying()

Returns true, if Spotify is playing atm

#####Track GetCurrentTrack()

Returns the current Track

#####StatusResponse GetStatusResponse()

Returns the StatusResponse, which contains all Information gathered by the Call (Should not be used at all)

SpotifyEventHandler

#####Event OnTrackChange

Triggered, when the Track gets changed

#####Event OnPlayStateChange

Triggered, when Spotify's Play/Pause-State changes

#####Event OnVolumeChange

Triggered, when the volume gets changed

#####Event TrackTimeChangeEventHandler

Triggered, when the current trackposition changes

#####void ListenForEvents(Boolean listen)

Should it listen for events?

#####void SetSynchronizingObject(ISynchronizeInvoke obj)

Sets the synced object, so no Invoke is required (Events doesnt get called from the Main-Thread)

Track

#####String GetTrackName()

Returns Track-name

#####String GetArtistName()

Returns Artist-name

#####String GetAlbumName()

Returns Album-name

#####int GetLength()

Returns the Track lenght

#####String GetAlbumURI()

Returns the URI for the album

#####String GetTrackURI()

Returns the URI for the Track

#####String GetArtistURI()

Returns the URI for the Artist

#####String GetAlbumArtURL(AlbumArtSize size)

Returns the URL of the Albumart based on the choosen size

#####Bitmap GetAlbumArt(AlbumArtSize size)

Returns a Bitmap of the Albumart based on the choosen size

#####Bitmap GetAlbumArtAsync(AlbumArtSize size)

Returns a Bitmap of the Albumart based on the choosen size asynchronously