hipchat_elixir v0.5.1 Hipchat.ApiClient View Source

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.

Link to this section Summary

Link to this section Types

Link to this type t() View Source
t() :: %Hipchat.ApiClient{access_token: nil | String.t(), auth_test?: boolean(), httpc_opts: list()}

Link to this section Functions

Link to this function new(access_token, auth_test? \\ false, httpc_opts \\ []) View Source
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 httpc_opts, see Hipchat.Httpc.request/5 for details.