View Source GitHub (GitHub REST API Client v0.0.13)

Link to this section Summary

Functions

Run a client operation and return the raw Operation or Error

Link to this section Functions

Link to this function

raw(module, function, args, opts \\ [])

View Source
@spec raw(module(), atom(), [any()], keyword()) ::
  {:ok, GitHub.Operation.t()} | {:error, GitHub.Error.t()}

Run a client operation and return the raw Operation or Error

Normal client operation calls return only the response body. This function can be useful when the caller needs additional information, such as data from the response headers.

The args passed to this function should not include the opts argument usually available on client operations. Instead, any such options should be passed as the final argument to raw/4.

example

Example

iex> GitHub.raw(GitHub.Users, :get_authenticated, [])
{:ok, %GitHub.Operation{}}