View Source Zendesk.Client (zendesk v0.0.3)

Make requests to the API.

The requests are made using Zendesk.Client.Operations.

Link to this section Summary

Functions

Make a DELETE request to the API at the given URL.

Make a GET request to the API at the given URL.

Make a POST request to the API at the given URL.

Make a PUT request to the API at the given URL.

Call the API with the given Zendesk.Client.Operation.

Call the API with the given Zendesk.Client.Operation.

Link to this section Functions

Link to this function

delete(url, headers \\ [])

View Source
@spec delete(String.t(), [{atom(), String.t()}]) ::
  {:ok, binary(), list()} | {:error, String.t()}

Make a DELETE request to the API at the given URL.

Link to this function

get(url, headers, params)

View Source
@spec get(String.t(), [{atom(), String.t()}], list()) ::
  {:ok, binary(), list()} | {:error, String.t()}

Make a GET request to the API at the given URL.

Link to this function

post(url, headers \\ [], body)

View Source
@spec post(String.t(), [{atom(), String.t()}], map()) ::
  {:ok, binary(), list()} | {:error, String.t()}

Make a POST request to the API at the given URL.

Link to this function

put(url, headers \\ [], body)

View Source
@spec put(String.t(), [{atom(), String.t()}], map()) ::
  {:ok, binary(), list()} | {:error, String.t()}

Make a PUT request to the API at the given URL.

@spec request(Zendesk.Client.Operation.t()) :: Parser.parsed_result()

Call the API with the given Zendesk.Client.Operation.

@spec request!(Zendesk.Client.Operation.t()) :: Parser.parsed_result()

Call the API with the given Zendesk.Client.Operation.

This function throws an error if there was any issue calling the API.