From 9ba8a792709ac6507e813cdc2cf7aaf87f4572c1 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Wed, 12 Oct 2022 16:35:06 +0200 Subject: [PATCH] Update 'vertical life api' --- vertical-life-api.md | 111 ++++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/vertical-life-api.md b/vertical-life-api.md index 26cb830..bbdb7a5 100644 --- a/vertical-life-api.md +++ b/vertical-life-api.md @@ -1,56 +1,57 @@ -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. - -# Location -The VL API is located at [https://ifsc.results.info/api/v1/](https://ifsc.results.info/api/v1/) - -# Authentication -- The VL API requires "authentication". -- To authenticate, the user has to pass an API-Key an HTTP-Header. -- 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) -- 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. - -# Usage -## Get all seasons and leagues -- Path: ```/``` -- 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/``` -- This will return a list of competitions in the season -- content: - - ```d_cats```: categories [array] - - ```events```: competitions [array] - - ```d_cats```: categories in the competitions [array] - - ```status```: current status of the competitions [string] - - ```registration_active``` - - ```registration_pending``` - - ```active``` ? - - ```finished``` - - ```category_rounds``` - - ```status```: current status of the round - - ```pending``` - - ```active``` - - ```finished``` - -# Examples -- [All seasons](https://ifsc.results.info/api/v1/) -## Boulder -- [competition](https://ifsc.results.info/api/v1/events/1113) -- [category](https://ifsc.results.info/api/v1/events/1113/result/3) -- [round](https://ifsc.results.info/api/v1/category_rounds/5462/results) -## Speed -- [competition](https://ifsc.results.info/api/v1/events/1113) -- [category](https://ifsc.results.info/api/v1/events/1113/result/2) -- [round](https://ifsc.results.info/api/v1/category_rounds/5465/results) -## Lead -- [competition](https://ifsc.results.info/api/v1/events/1118/) -- [category](https://ifsc.results.info/api/v1/events/1118/result/1) -- [round](https://ifsc.results.info/api/v1/category_rounds/5504/results) -## Combined -- [competition](https://ifsc.results.info/api/v1/events/70) -- [category](https://ifsc.results.info/api/v1/events/70/result/4) +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. + +# Location +The VL API is located at [https://ifsc.results.info/api/v1/](https://ifsc.results.info/api/v1/) + +# Authentication +- ~~The VL API requires "authentication". ~~ +- ~~To authenticate, the user has to pass an API-Key an HTTP-Header. ~~ +- ~~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) +- ~~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 +- Path: ```/``` +- 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/``` +- This will return a list of competitions in the season +- content: + - ```d_cats```: categories [array] + - ```events```: competitions [array] + - ```d_cats```: categories in the competitions [array] + - ```status```: current status of the competitions [string] + - ```registration_active``` + - ```registration_pending``` + - ```active``` ? + - ```finished``` + - ```category_rounds``` + - ```status```: current status of the round + - ```pending``` + - ```active``` + - ```finished``` + +# Examples +- [All seasons](https://ifsc.results.info/api/v1/) +## Boulder +- [competition](https://ifsc.results.info/api/v1/events/1113) +- [category](https://ifsc.results.info/api/v1/events/1113/result/3) +- [round](https://ifsc.results.info/api/v1/category_rounds/5462/results) +## Speed +- [competition](https://ifsc.results.info/api/v1/events/1113) +- [category](https://ifsc.results.info/api/v1/events/1113/result/2) +- [round](https://ifsc.results.info/api/v1/category_rounds/5465/results) +## Lead +- [competition](https://ifsc.results.info/api/v1/events/1118/) +- [category](https://ifsc.results.info/api/v1/events/1118/result/1) +- [round](https://ifsc.results.info/api/v1/category_rounds/5504/results) +## Combined +- [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) \ No newline at end of file