REST interface for foobar2000. This interace does not expose anywhere close to all of foobar2000's functionality.
Uses eidheim's Simple-Web-Server (included), nlohmann's json (included), boost and the foobar2000 SDK.
Tested with Visual Studio 2015 and foobar2000 1.3.9.
Title | Description |
---|---|
simple.html | Minimal example showing retrieval of playlists and playlist content. |
playlists.html | Example showing more advanced playlist usage. Shows retrieval and displaying of playlists and playlist content, and shows how to play songs from a playlist. |
playback.html | Shows how to control some playback features, and shows how to control volume, including a volume slider displaying volume levels the same way as foobar2000. |
For example usage, see demos in the /demo folder.
Resource | Description | Example | Returns |
---|---|---|---|
/playlists GET | Returns an array of all the playlists. | /playlists | [ { title, id, itemCount, isPlaying } ] |
/playlist/{id} GET | Returns the items in a specific playlist. | /playlist/1 | [ { artist, title, album, trackNumber, id, isPlaying } ] |
/play/{playlistId}/{trackId} POST | Plays the specified item in the specific playlist. | /play/1/13 | Nothing. |
/playback/{commandId} POST | Executes the specified playback command. The list of available commands can be found in foobar::PlaybackCommand | /playback/1 | Nothing. |
/volume GET | Returns the current volume, in dB. | /volume | { db } |
/volume/{volume} POST | Sets the volume. Must be in dB. | /volume/-5.31 | Nothing. |
/volume/ismuted GET | Returns whether the volume is muted or not. | /volume/ismuted | { isMuted } |
Put foo_rest.dll in C:\Program Files (x86)\foobar2000\components
(or wherever foobar2000 is installed).