CommcareAPI.CommcareClient (commcare_api v0.3.1) View Source

Client to use or wrap for interacting with CommCare.

Link to this section Summary

Link to this section Types

Specs

error_reason() ::
  :commcare_authorization_error
  | :commcare_data_error
  | :commcare_forbidden
  | :not_found

Link to this section Functions

Link to this function

get_user(commcare_domain, user_id, config)

View Source

Specs

get_user(
  commcare_domain :: String.t(),
  user_id :: String.t(),
  config :: CommcareAPI.Config.t()
) :: {:ok, any()} | {:error, error_reason()}

Specs

ping(config :: CommcareAPI.Config.t()) :: :ok | {:error, error_reason()}
Link to this function

post_contact(commcare_data, contact, config)

View Source

Specs

post_contact(
  commcare_data :: map(),
  contact :: map(),
  config :: CommcareAPI.Config.t()
) ::
  {:ok, term()} | {:error, term()}