Uber Technologies Inc. (http://uber.com) client library for Elixir. It uses oauth2 to call Uber's REST API. More info at https://developer.uber.com.
For now it supports very limited set of functions. Refer to lib/elixir_uber.ex for available functions and examples.
Package can be installed as:
- Add
elixir_uber
to your list of dependencies inmix.exs
:
def deps do
[{:elixir_uber, "~> 0.0.6"}]
end
- Ensure
elixir_uber
is started before your application:
def application do
[applications: [:elixir_uber]]
end
- Configuration
# Configure client
iex(4)> ElixirUber.configure("UBER_CLIENT_ID", "UBER_CLIENT_SECRET", "CALLBACK_URL")
# Call authorize_url! method
iex(4)> ElixirUber.authorize_url!
# You will be redirected to the callback url, copy your code
iex(4)> access_token = ElixirUber.get_token!(code: "CODE")
# Now we can optionally set this as the global token, and make requests with it by passing :global instead of a token.
iex(4)> ElixirUber.configure(:global, access_token)
{:ok, []}
# Get user object or use client instead of :global
iex(4)> user = ElixirUber.me(:global)
It's very early version, most of API functions are missing.
- API methods for Requests, Receipts added. Improved History retrieving, added offset and limit parameters. Additional scopes are added :all_trips, :request, :request_receipt
- API method for Products added
- API method for Places added
- API method for Payments added
- Basic rides history
- Update dependencies
- Basic current user info
- Update dependencies