From 58187aa300a0bbf97625d0e2906eb55511499f5a Mon Sep 17 00:00:00 2001 From: Benjamin Kyd Date: Mon, 28 Mar 2022 13:35:17 +0100 Subject: [PATCH] lol Former-commit-id: 8708e747b91f3652e6c1832d23fe37a74f9566f5 --- docs/API.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/API.md b/docs/API.md index af23847..504fafa 100644 --- a/docs/API.md +++ b/docs/API.md @@ -10,11 +10,11 @@ automatically every request | Type | Route | Queries | Auth? | Notes | | --- | --- | --- | -- | --- | -| GET | /api/search/ | query, page | no | | -| GET | /api/bricks/ | query, page | no | | -| GET | /api/sets/ | query, page | no | | -| GET | /api/sets/featured | page | no | | -| GET | /api/brick/:id/ | | no | | +| GET | /api/search/ | query, page | no | Query endpoint | +| GET | /api/bricks/ | query, page | no | Query endpoint | +| GET | /api/sets/ | query, page | no | Query endpoint | +| GET | /api/sets/featured | page | no | Query endpoint | +| GET | /api/brick/:id/ | | no | | | GET | /api/set/:id/ | | no | | | GET | /api/cdn/:id/ | | no | | | PUT | /api/auth/login/ | | yes | | @@ -26,11 +26,26 @@ automatically every request | DEL | /api/auth/basket/:id | quantity | yes | if no id, delete whole | | DEL | /api/auth/basket/ | | yes | if no id, delete whole | +Query endpoints do not return the full data on a brick/set, they return +a subset for product listing pages + ## Query structure +## Query parameters +For all endpoints that query, the following parameters are supported: + +tags: tags to include in search +page: starting page +pages: pages to return starting from page +q: string to search for (fuzzy) +brick: brick to search for (absolute) +set: brick to search for (absolute) ### /api/search/ + + + ### /api/bricks/ GET