hipchat_elixir v0.1.0 Hipchat.V2.Client

Client struct module for HipChat API v2.

Summary

Types

res_t()
res_t() :: {:ok, Hipchat.Response.t} | {:error, any}
t()
t() :: %Hipchat.V2.Client{access_token: nil | String.t, auth_test?: boolean, hackney_opts: Keyword.t}

Functions

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

Generate client struct for HipChat API.

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.