Deputy (Deputy v0.0.0-dev)
View SourceDeputy is an Elixir client for the Deputy API.
Configuration
You can configure the Deputy client with:
client = Deputy.new(
base_url: "https://your-subdomain.deputy.com",
api_key: "your-api-key"
)Usage Example
# Create a client
client = Deputy.new(
base_url: "https://your-subdomain.deputy.com",
api_key: "your-api-key"
)
# Get locations
{:ok, locations} = Deputy.Locations.get_locations(client)
Summary
Functions
Creates a new Deputy client with the given configuration.
Makes a HTTP request to the Deputy API.
Types
Functions
Creates a new Deputy client with the given configuration.
Options
:base_url- Required. The base URL for the Deputy API.:api_key- Required. The API key for authentication.:http_client- Optional. Module implementing the HTTPClient behavior. Defaults to Deputy.HTTPClient.Req.
Examples
iex> Deputy.new(base_url: "https://your-subdomain.deputy.com", api_key: "your-api-key")
%Deputy{base_url: "https://your-subdomain.deputy.com", api_key: "your-api-key", http_client: Deputy.HTTPClient.Req}
Makes a HTTP request to the Deputy API.
This is used internally by the API module functions.