docs: start of api reference file

user-register
Jef Roosens 2023-05-13 12:29:35 +02:00
parent 3126f81200
commit 8909ac57a8
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 42 additions and 0 deletions

View File

@ -1,3 +1,45 @@
# Affluences API Reference
## Terminology
* `site`
* General name for a location/institution
* Defined by a UUID and a slug, e.g. `ghent-university`
* Can contain one more or more sites, e.g.
`ghent-university-library-book-tower` is a child of `ghent-university`
## Notes
The API checks for browser user agents, so your requests should include a valid
user agent of a modern browser.
## API Routes
### Search for sites
`GET https://api.affluences.com/app/v3/sites`
**Body format**
```json
{
"selected_categories": [
1
],
"page": 0,
"search_query": "university of ghent"
}
```
**Response format**
`Data<Vec<SiteData>>`
### Retrieve time table for a given site
`GET https://reservation.affluences.com/api/sites/4737e57a-ee05-4f7b-901a-7bb541eeb297`
curl -L 'https://api.affluences.com/app/v3/sites/ghent-university' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0'
returnt lijst van alle bibliotheken op ugent, inclusief de uuids die dan nodig zijn om de specifieke requests te sturen naar die bib zijn stuff