Opened 5 months ago

Last modified 4 months ago

#872 accepted defect

set up the jukebox server to take CUPS requests

Reported by: m Owned by: amber 💖
Priority: minor Milestone:
Component: Hackery Keywords:
Cc:

Change History (3)

comment:2 by amber 💖, 4 months ago

this is a great idea, thanks for opening! while i know nothing about CUPS, i think a system where anyone can write a shim to upload whatever music files they want to the queue could be a good idea.

only youtube functionality has been added so far. i will work on the uploading system at a later date (once i have a bit more time).

for reference, here are the APIs that i've already added:

get current state

curl -X 'GET' \
  'https://jukebox.tracert.me/api/queue' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

add youtube video id to queue

curl -X 'POST' \
  'https://jukebox.tracert.me/api/queue' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "accessCode": "1234",
  "videoId": "A_MjCqQoLLA"
}'

move item in queue

curl -X 'PUT' \
  'https://jukebox.tracert.me/api/queue' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "accessCode": "1234",
  "fromIndex": 3,
  "toIndex": 0
}'

delete item from queue

curl -X 'DELETE' \
  'https://jukebox.tracert.me/api/queue?index=1&clear=true' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
  "accessCode": "1234"
}'

the API docs still need a lot of work, but they're located here: ​https://jukebox.tracert.me/api-docs.html(​https://jukebox.tracert.me/api-docs.html)

comment:3 by amber 💖, 4 months ago

Owner: set to amber 💖
Status: new → accepted
Note: See TracTickets for help on using tickets.