Typetalk v0.2.0 Typetalk.AccessToken

A AccessToken struct and functions.

Link to this section Summary

Link to this section Types

Link to this type t()
t() :: %Typetalk.AccessToken{
  access_token: String.t(),
  expires_in: non_neg_integer(),
  refresh_token: String.t(),
  token_type: String.t()
}

Link to this section Functions

Link to this function get_access_token(post_data)
Link to this function refresh(access_token, client_id, client_secret)
refresh(Typetalk.AccessToken, String.t(), String.t()) ::
  {:ok, Typetalk.AccessToken} | {:error, HTTPoison.Response.t()}

Refresh the access token.

Example

{:ok, token} = Typetalk.ClientCredential.access_token(client_id, client_secret)
{:ok, refreshed_token} = Typetalk.AccessToken.refresh(access_token, client_id, client_secret)

API Doc

API Doc