View Source TwitchAPI.Auth (hello_twitch_api v0.4.2)

Auth struct.

Summary

Functions

Make a new Auth struct.

Refresh an access token.

Revoke an access token.

Types

@type t() :: %TwitchAPI.Auth{
  access_token: String.t() | nil,
  client_id: String.t(),
  client_secret: String.t() | nil,
  refresh_token: String.t() | nil
}

Functions

Link to this function

new(client_id, access_token \\ nil)

View Source
@spec new(client_id :: String.t(), access_token :: String.t() | nil) :: t()

Make a new Auth struct.

@spec token_refresh(Auth.t()) :: {:ok, Req.Response.t()} | {:error, term()}

Refresh an access token.

@spec token_revoke(Auth.t()) :: {:ok, Req.Response.t()} | {:error, term()}

Revoke an access token.