Goal
To serve the data for the history function, we need an endpoint to communicate data.
Context
For this issue, we assume, the investigation in #2 lead to the conclusion GraphQL is the way to go.
In order to build a stream we need a endpoint that gives us a certain amount of data after a specific gif played in the history.
For this, we believe GraphQL's Cursor is a good way to go about it.
Tasks
[ ] create in api.py the endpoint /history which
[ ] is a GET
[ ] has the parameter
[ ] ?amount=N: default is 10 if this param is not given. get latest N||10 entries from TrashTvArchillectHistory
[ ] ?starting=ID_FROM_TrashTvArchillectHistory: default is the gif after the most recent in db by timestamp
[ ] its response is a defaultdict and looks like this:
Depends on #2
Goal To serve the data for the history function, we need an endpoint to communicate data.
Context For this issue, we assume, the investigation in #2 lead to the conclusion GraphQL is the way to go. In order to build a stream we need a endpoint that gives us a certain amount of data after a specific gif played in the history. For this, we believe GraphQL's Cursor is a good way to go about it.
Tasks
api.py
the endpoint/history
whichGET
?amount=N
: default is 10 if this param is not given. get latestN
||10
entries fromTrashTvArchillectHistory
?starting=ID_FROM_TrashTvArchillectHistory
: default is the gif after the most recent in db by timestampdefaultdict
and looks like this: