Étape 7: Uber Api
Uber communautaire fait tester le service pour ses api appelé sandbox.
Afin de rendre toute demande aux serveurs d’uber, vous devez avoir une application sur les développeurs uber. Obtenir le jeton d’accès.
J’ai utilisé un addon de firefox appelé RESTClient .
.
.
Ajoutez-les aux en-têtes.
Autorisation
Porteur OAUTH2-clé
Content-Type
application/json
.
pour obtenir des produnct_id
- Télécharger
https://sandbox-API.uber.com/v1/Products
{« start_latitude »: "YOUR_LAT", "start_longitude": « YOUR_LONG »}
le cycle de la demande est la suivante :
- Publier
https://sandbox-API.uber.com/v1/requests
{« start_latitude »: "YOUR_LAT", "start_longitude": "YOUR_LONG", "product_id": "PRODUCT_ID"}
METTRE
https://sandbox-API.uber.com/v1/sandbox/requests/REQUEST_ID_FROM_PREVIOUS_REQUEST _RESPONSE
{« statut »: « acceptée »}
Télécharger
Voici le code pour arduino.
Remarque : you'are le seul responsable pour toute demande déposée auprès de l’api principale.