tanuki v0.1.0 Tanuki.Client

Summary

Functions

Returns a Tanuki struct which is needed for each request

Types

client_struct ::
  %{private_token: binary, endpoint: binary} |
  %{oauth_token: binary, endpoint: binary}

Functions

new(map)

Specs

new(binary) :: client_struct

Returns a Tanuki struct which is needed for each request.

iex> Tanuki.Client.new(%{private_token: “private_token”}) %Tanuki.Client{endpoint: “https://gitlab.com/api/v3/”, private_token: “private_token”, oauth_token: nil}

iex> Tanuki.Client.new(%{private_token: “private_token”}, “https://mydomain.tld”) %Tanuki.Client{endpoint: “https://mydomain.tld/”, private_token: “private_token”, oauth_token: nil}

Or when using an OAuth token:

iex> Tanuki.Client.new(%{oauth_token: “token”}) %Tanuki.Client{endpoint: “https://gitlab.com/api/v3/”, private_token: nil, oauth_token: “token”}

new(map, endpoint)

Specs

new(binary, binary) :: client_struct