BambooHR.Client (BambooHR v0.2.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("your_company", "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.
Parameters
company_domain
- Your company's subdomainapi_key
- Your API keybase_url
- Optional custom base URL for the API (defaults to BambooHR's standard API URL)
Examples
iex> client = BambooHR.Client.new("acme", "api_key_123")
%{
company_domain: "acme",
api_key: "api_key_123",
base_url: "https://api.bamboohr.com/api/gateway.php"
}
# With custom base URL
iex> client = BambooHR.Client.new("acme", "api_key_123", "https://custom-api.example.com")
%{
company_domain: "acme",
api_key: "api_key_123",
base_url: "https://custom-api.example.com"
}
Makes a POST request to the BambooHR API.
This function is meant to be used by resource modules.