docs: start of api reference file
parent
3126f81200
commit
8909ac57a8
|
@ -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'
|
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
|
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
|
||||||
|
|
Loading…
Reference in New Issue