
API Skitour
L'API vous permet d'effectuer des requêtes sur la base topos/sorties de Skitour pour alimenter votre propre application. Chaque requête doit être signée dans le header avec le paramètre "cle" à récupérer dans la page de modification de votre profil. Conditions d'utilisation.
GET
/api/massifs
Récupère la liste des massifs
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/massifs"
Réponse :
JSON exemple
Massifs ou
JSON {"ERROR":"type"}
GET
/api/sommets
Récupère une liste de sommets
Paramètres (facultatifs) :
- m -> liste d'id massif, sous la forme x,y,z
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/sommets?m=1,2,3"
Réponse :
JSON exemple
Sommets ou
JSON {"ERROR":"type"}
GET
/api/departs
Récupère une liste de départs
Paramètres (facultatifs) :
- m -> liste d'id massif, sous la forme x,y,z
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/departs?m=1,2,3"
Réponse :
JSON exemple
Départs ou
JSON {"ERROR":"type"}
GET
/api/refuges
Récupère une liste de refuges
Paramètres (facultatifs) :
- m -> liste d'id massif, sous la forme x,y,z
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/refuges?m=1,2,3"
Réponse :
JSON exemple
Refuges ou
JSON {"ERROR":"type"}
GET
/api/topos
Récupère une liste de topos
Paramètres (au moins un paramètre est obligatoire) :
- m -> id_massif (recherche les topos liés au massif)
- ll -> lat,lon (recherche les topos proche de la position lat,lon fournie)
- s -> id_sommet (recherche les topos liés au sommet)
- d -> id_depart (recherche les topos liés au départ)
- r -> id_refuge (recherche les topos liés au refuge)
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/topos?m=1&ll=45.5,7.1"
Réponse :
JSON exemple
Topos ou
JSON {"ERROR":"type"}
GET
/api/topo/{id}
Récupère le topo {id}
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/topo/125"
Réponse :
JSON exemple
Topo ou
JSON {"ERROR":"type"}
GET
/api/sorties
Récupère une liste de sorties, par défaut de la saison en cours
Paramètres (facultatifs) :
- a -> saison (2022 = saison 2021/2022)
- m -> id_massif
- ll -> lat,lon (recherche autour de la position lat,lon)
- s -> id_sommet
- d -> id_depart
- t -> id_topo
- k -> dif_ski (1 à 5)
- o -> orientation (N recherche entre NE et NO, NE recherche entre N et E, etc...)
- g -> fichier GPX associé (1)
- u -> id auteur ou id participant
- l -> nombre maximum de résultats retournés
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/sorties?a=2022&k=5"
Réponse :
JSON exemple
Sorties ou
JSON {"ERROR":"type"}
GET
/api/sortie/{id}
Récupère la sortie {id} et les conditions liées
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/sortie/571"
Réponse :
JSON exemple
Sortie ou
JSON {"ERROR":"type"}
GET
/api/conditions
Récupère une liste de conditions, par défaut depuis un mois
Paramètres (facultatifs) :
- a -> mois (04.2022 = avril 2022)
- m -> id_massif
- ll -> lat,lon (recherche autour de la position lat,lon)
- s -> id_sommet
- d -> id_depart
- t -> id_topo
- k -> dif_ski (1 à 5)
- o -> orientation (N recherche entre NE et NO, NE recherche entre N et E, etc...)
- u -> id auteur ou id participant
Exemple cURL :
curl -X GET -H "cle: yYOlbMcps8rOuUCdVDTwbawLXO26IHLM" "https://skitour.fr/api/conditions?a=04.2022&o=N"
Réponse :
JSON exemple
Conditions ou
JSON {"ERROR":"type"}