Update 'vertical life api'

Dorian Zedler 2022-10-12 16:35:06 +02:00
parent f7f4e5d76a
commit 9ba8a79270

@ -1,56 +1,57 @@
This is some documentation for the new (sadly proprietary) vertical life api of the IFSC. This is some documentation for the new (sadly proprietary) vertical life api of the IFSC.
All the information on this page have been gathered by reverse-engineering the IFSC App and doing some trail and error on the API. All the information on this page have been gathered by reverse-engineering the IFSC App and doing some trail and error on the API.
# Location # Location
The VL API is located at [https://ifsc.results.info/api/v1/](https://ifsc.results.info/api/v1/) The VL API is located at [https://ifsc.results.info/api/v1/](https://ifsc.results.info/api/v1/)
# Authentication # Authentication
- The VL API requires "authentication". - ~~The VL API requires "authentication". ~~
- To authenticate, the user has to pass an API-Key an HTTP-Header. - ~~To authenticate, the user has to pass an API-Key an HTTP-Header. ~~
- The header is: ```x-auth-token``` - ~~The header is: ```x-auth-token``` ~~
[//]: <> (and the key is ```cc7375f680648e7e6171e035e70351eb``` probably this is not the only key, but it is the only one I know about) [//]: <> (and the key is ```cc7375f680648e7e6171e035e70351eb``` probably this is not the only key, but it is the only one I know about)
- For easy use, a browser plugin can be used to inject the header automatically, [this one](https://addons.mozilla.org/en-US/firefox/addon/modify-header-value/) worked just fine for me on Firefox. - ~~For easy use, a browser plugin can be used to inject the header automatically, [this one](https://addons.mozilla.org/en-US/firefox/addon/modify-header-value/) worked just fine for me on Firefox.~~
- This does not seem to work anymore
# Usage
## Get all seasons and leagues # Usage
- Path: ```/``` ## Get all seasons and leagues
- This will return all seasons with leagues and the current one - Path: ```/```
- Example: [https://ifsc.results.info/api/v1/](https://ifsc.results.info/api/v1/) - This will return all seasons with leagues and the current one
- Example: [https://ifsc.results.info/api/v1/](https://ifsc.results.info/api/v1/)
## Get league data
- Path: ```https://ifsc.results.info/api/v1/season_leagues/<leagueId>``` ## Get league data
- This will return a list of competitions in the season - Path: ```https://ifsc.results.info/api/v1/season_leagues/<leagueId>```
- content: - This will return a list of competitions in the season
- ```d_cats```: categories [array] - content:
- ```events```: competitions [array] - ```d_cats```: categories [array]
- ```d_cats```: categories in the competitions [array] - ```events```: competitions [array]
- ```status```: current status of the competitions [string] - ```d_cats```: categories in the competitions [array]
- ```registration_active``` - ```status```: current status of the competitions [string]
- ```registration_pending``` - ```registration_active```
- ```active``` ? - ```registration_pending```
- ```finished``` - ```active``` ?
- ```category_rounds``` - ```finished```
- ```status```: current status of the round - ```category_rounds```
- ```pending``` - ```status```: current status of the round
- ```active``` - ```pending```
- ```finished``` - ```active```
- ```finished```
# Examples
- [All seasons](https://ifsc.results.info/api/v1/) # Examples
## Boulder - [All seasons](https://ifsc.results.info/api/v1/)
- [competition](https://ifsc.results.info/api/v1/events/1113) ## Boulder
- [category](https://ifsc.results.info/api/v1/events/1113/result/3) - [competition](https://ifsc.results.info/api/v1/events/1113)
- [round](https://ifsc.results.info/api/v1/category_rounds/5462/results) - [category](https://ifsc.results.info/api/v1/events/1113/result/3)
## Speed - [round](https://ifsc.results.info/api/v1/category_rounds/5462/results)
- [competition](https://ifsc.results.info/api/v1/events/1113) ## Speed
- [category](https://ifsc.results.info/api/v1/events/1113/result/2) - [competition](https://ifsc.results.info/api/v1/events/1113)
- [round](https://ifsc.results.info/api/v1/category_rounds/5465/results) - [category](https://ifsc.results.info/api/v1/events/1113/result/2)
## Lead - [round](https://ifsc.results.info/api/v1/category_rounds/5465/results)
- [competition](https://ifsc.results.info/api/v1/events/1118/) ## Lead
- [category](https://ifsc.results.info/api/v1/events/1118/result/1) - [competition](https://ifsc.results.info/api/v1/events/1118/)
- [round](https://ifsc.results.info/api/v1/category_rounds/5504/results) - [category](https://ifsc.results.info/api/v1/events/1118/result/1)
## Combined - [round](https://ifsc.results.info/api/v1/category_rounds/5504/results)
- [competition](https://ifsc.results.info/api/v1/events/70) ## Combined
- [category](https://ifsc.results.info/api/v1/events/70/result/4) - [competition](https://ifsc.results.info/api/v1/events/70)
- [category](https://ifsc.results.info/api/v1/events/70/result/4)
- [round](https://ifsc.results.info/api/v1/category_rounds/487/results) - [round](https://ifsc.results.info/api/v1/category_rounds/487/results)