Spotify

Change Spotify sync

PATCH/api/spotify
Admin. Needs an unlock token (x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.

Any of: follow Spotify, learn beat maps by listening, use Spotify's own analysis, cover colours, fade on pause, dim when muted, and the shared beat-map service.

Request body application/json

syncboolean
learnboolean
analysisboolean
coverColoursboolean
pauseFadeboolean
muteDimboolean
cloudobject

Responses

200OKapplication/json
settingsobject
onboolean
connectedboolean
modestring
One of "exact" "shared" "analysis" "learning" "live" "paused" "idle" "off"
modeNamestring
viastring | null
errorstring | null
trackobject | null

The Spotify track.

mapobject | null

The beat map in use.

learnobject | null

Learning progress.

lockedboolean
analysisstring
One of "off" "blocked" "unknown"
accountobject

The connected account.

localobject

Now playing on this computer.

pollobject

Polling timing.

cloudobject

The shared beat-map service.

colorsarray | null
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequired

What went wrong, in a sentence for people.

403Locked, or not allowed.application/json
errorstringrequired

What went wrong, in a sentence for people.

Request
curl -X PATCH 'http://localhost:8080/api/spotify' \
  -H 'content-type: application/json' \
  -d '{
  "sync": true,
  "coverColours": true
}'
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"
  ]
}
Edit on GitHub