hipchat_elixir v0.2.2 Hipchat.ApiClient

Client struct module for ordinary HipChat APIs.

Here, by “ordinary” it refers to APIs that require authentication with any type of access_token, or APIs that do not require authentication at all (such as Capabilities API).

If you need to make a OAuth token retrieval request to fetch access_tokens, use Hipchat.OauthClient instead.

Summary

Types

t()
t() :: %Hipchat.ApiClient{access_token: nil | String.t, auth_test?: boolean, hackney_opts: list}

Functions

new(access_token, auth_test? \\ false, hackney_opts \\ [])
new(nil | String.t, boolean, list) :: t

Generate ApiClient struct.

access_token needs to be retrieved beforehand. It will be included in an Authorization header. If set to nil the header will not be generated.

If auth_test? is set to true, auth_test=true query parameter will be generated. Defaults to false. This can be used to test an access_token.

For hackney_opts, see here for details.