Skip to content

Commit

Permalink
Add example to Queue endpoint docs
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Feb 21, 2021
1 parent c435fe1 commit 6a1b660
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def get(self, queue: str, number: int) -> str:
"""Returns the JSON representation of the item requested.
Example:
/api/ce/100 returns:
{
"lastUpdated": "07-23-20 10:11 PM",
"headers": [...],
Expand Down Expand Up @@ -48,6 +47,12 @@ class Queue(Resource):
def get(self, queue: str) -> str:
"""Returns the JSON representation of the queue requested.
Example:
{
"name": ce,
"items": [...]
}
Args:
queue (str): The queue requested.
Expand Down Expand Up @@ -83,6 +88,8 @@ def get(self) -> list:
"""
return ECNQueue.getQueueCounts()



api.add_resource(QueueList, "/api/get_queues")
api.add_resource(Item, "/api/<string:queue>/<int:number>")
api.add_resource(Queue, "/api/<string:queue>")
Expand Down

0 comments on commit 6a1b660

Please sign in to comment.