From 927f7fa787710d60489057231eb8b7311b9a0d4d Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 29 Nov 2019 00:44:59 +0100 Subject: [PATCH] api doc v0.1 --- API.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 0000000..b781ba1 --- /dev/null +++ b/API.md @@ -0,0 +1,58 @@ +# API 0.1 +Version major.minor + - major: braking change + - minor: compatible addition + +## Notes +json endpoints return a list should always be encapsulated ba an object to make non-breaking api changes easier, like this example +```json + {"events":[{},{},{}]} +``` + +##Endpoints +### Items + +#### ``GET /api///items`` + +#### ``GET /api///items/`` +the should be url-encoded + +#### ``GET /api///item/`` + +#### ``DELETE /api///item/`` + +#### ``PUT /api///item/`` + +#### ``POST /api///item/`` + +### Boxes + +#### ``GET /api///boxes`` + +#### ``GET /api///box/`` + +#### ``DELETE /api///box/`` + +#### ``PUT /api///box/`` + +#### ``POST /api///box/`` + +### Events +```json +{ +"name":"36. Chaos Communication Congress", +"slug":"36C3", +"start": 1577401200, +"end": 1577746800, +"pre_start": 1576882800, +"post_end": 1577919600 +} +``` + +#### ``GET /api//events`` + +returns a list of all tracked events + +### Files/Images + +#### ``GET /api/images/`` \ No newline at end of file