Spotify
Get Spotify sync
GET
/api/spotifyOpen. Open to everyone who can reach Tempolight.
The sync settings, the mode (exact, shared, analysis, learning, live, paused, idle, off), the track and its beat map, learning progress and the cover colours.
Responses
200OKapplication/json
settingsobjectonbooleanconnectedbooleanmodestringOne of
"exact" "shared" "analysis" "learning" "live" "paused" "idle" "off"modeNamestringviastring | nullerrorstring | nulltrackobject | nullThe Spotify track.
mapobject | nullThe beat map in use.
learnobject | nullLearning progress.
lockedbooleananalysisstringOne of
"off" "blocked" "unknown"accountobjectThe connected account.
localobjectNow playing on this computer.
pollobjectPolling timing.
cloudobjectThe shared beat-map service.
colorsarray | nullRequest
curl 'http://localhost:8080/api/spotify'const res = await fetch("http://localhost:8080/api/spotify");
const data = await res.json();
console.log(data);import requests
res = requests.get(
"http://localhost:8080/api/spotify",
)
print(res.json())Response
{
"settings": {
"sync": true,
"learn": true,
"analysis": true,
"coverColours": true,
"pauseFade": true,
"muteDim": true,
"cloud": {
"url": "string",
"use": true,
"share": true
}
},
"on": true,
"connected": true,
"mode": "exact",
"modeName": "string",
"via": "string",
"error": "string",
"track": {},
"map": {},
"learn": {},
"locked": true,
"analysis": "off",
"account": {},
"local": {},
"poll": {},
"cloud": {},
"colors": [
"#ff0066"
]
}