#delivery #uber #parameters #api-request #direct #integration #api-integration

bin+lib uber_api

A library coded in Rust and hosted on crates.io for Uber's API. In particular, Uber Direct with their DaaS API. The Menu API Models have been added as well (endpoints in progress).

70 releases

0.2.8 May 6, 2024
0.2.7 Dec 13, 2023
0.1.63 Mar 31, 2023
0.1.23 Feb 27, 2023

#727 in Web programming

Download history 33/week @ 2024-09-14 132/week @ 2024-09-21 23/week @ 2024-09-28 8/week @ 2024-10-05 13/week @ 2024-10-12 16/week @ 2024-10-26 36/week @ 2024-11-02 17/week @ 2024-11-09 10/week @ 2024-11-16 7/week @ 2024-11-23 15/week @ 2024-11-30

54 downloads per month

MIT license

160KB
2.5K SLoC

Uber API

Uber has a vast array of integrations available, from using them as your logistics provider or integrating your restaurant onto their platform.

- Uber Direct (Uber Logistics - delivery vehicles)

- Uber Menu (Uber Groceries - host your restaurant on their platform) *in-progress

This crate has the relevant DaaS endpoints to make Uber Direct API calls along with all the models. This allows you to call the relevant API you want and not have to worry about how Uber wants to receive and handle the data.

  • The functions state which API can be called, the full documentation of that endpoint along with all the parameters needed for it, the complete Uber Direct docs - last updated 9/2/2023 - can be found within each function. The general flow is that each endpoint takes a request struct as its parameter. The docs for the direct parameters are also shown at each request struct. Create the request struct with the relevant information and simply pass that into the function to call the Uber Direct API.

  • It contains functions for the following:

Functions
Get authorization codes
Get a quote for a delivery
Create a new delivery
Cancel a delivery
Update a delivery
Get the information about the delivery
Get a list of deliveries
Get the returned proof of delivery document from driver
  • At the time of creation, access to these APIs may require written approval from Uber. Once successful, they will provide you with the relevant customer_id, client_id, and client_secret needed for Authentication.

  • Since then the models required for the Uber Menu integration have been added.

If you want to test that your authentication codes work, an example has been setup for you to run. Clone the repo: Uber API and run the main file, ensuring you pass in the relevant auth fields as parameters

Example: cargo run -- --customer-id="1234" --client-id="xyz" --client-secret="xyz"

Dependencies

~10–22MB
~321K SLoC