Skip to content

Instantly share code, notes, and snippets.

@StefanYohansson
Created November 6, 2017 17:30
Show Gist options
  • Select an option

  • Save StefanYohansson/4a57acbed4dfed150dfcb7506be0c6da to your computer and use it in GitHub Desktop.

Select an option

Save StefanYohansson/4a57acbed4dfed150dfcb7506be0c6da to your computer and use it in GitHub Desktop.
api
# API
## GET /queue
list all queues
*response*
```
[
{
"id": <id:int>,
"name": <name:str>,
"priority": <priority:int>,
"description": [description:text],
"active": <active:bool>
},
// ...
]
```
---
## POST /queue
add a new queue
*body*
```
{
"name": <name:str>,
"priority": <priority:int>,
"description": [description:text]
}
```
*response*
```
{
"id": <id:int>,
"name": <name:str>,
"priority": <priority:int>,
"description": [description:text]
}
```
## PUT /queue/{id}
edit a queue by id
*body*
```
{
["name": <name:str>],
["priority": <priority:int>],
["description": [description:text]],
["active": <active:boolean>]
}
```
*response*
```
{
"id": <id:int>,
"name": <name:str>,
"priority": <priority:int>,
"description": [description:text],
"active": <active:bool>
}
```
## DELETE /queue/{id}
delete a queue by id
*response*
```
{
"id": <id:int>,
"name": <name:str>,
"priority": <priority:int>,
"description": [description:text],
"active": <active:bool>
}
```
------
## POST /queue/{id}/entry
generate a new entry for specified queue
*response*
```
{
"entry": <entry:str>
}
```
## GET /queue/{id}/entry
request next entry in the queue
*response*
```
{
"entry": <entry:str>
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment