BambooHR.Client (BambooHR v0.3.0)
View SourceClient for interacting with the BambooHR API.
Configuration
To use this client, you'll need information from BambooHR:
- Your company's subdomain
- An API key
Usage
client = BambooHR.Client.new(company_domain: "your_company", api_key: "your_api_key")
{:ok, company_info} = BambooHR.Company.get_information(client)
Summary
Functions
Makes a GET request to the BambooHR API.
Creates a new client configuration.
Makes a POST request to the BambooHR API.
Types
Functions
Makes a GET request to the BambooHR API.
This function is meant to be used by resource modules.
Creates a new client configuration.
Options
:company_domain
- Your company's subdomain:api_key
- Your API key:base_url
- Optional. Custom base URL for the API (defaults to BambooHR's standard API URL):http_client
- Optional. Module that implements theHTTPClient
behavior. Defaults toBambooHR.HTTPClient.Req
.
Examples
iex> client = BambooHR.Client.new(company_domain: "acme", api_key: "api_key_123")
%{
company_domain: "acme",
api_key: "api_key_123",
base_url: "https://api.bamboohr.com/api/gateway.php",
http_client: BambooHR.HTTPClient.Req
}
# With custom base URL
iex> client = BambooHR.Client.new(company_domain: "acme", api_key: "api_key_123", base_url: "https://custom-api.example.com")
%{
company_domain: "acme",
api_key: "api_key_123",
base_url: "https://custom-api.example.com",
http_client: BambooHR.HTTPClient.Req
}
Makes a POST request to the BambooHR API.
This function is meant to be used by resource modules.