Typetalk v0.1.2 Typetalk.AccessToken

A AccessToken struct and functions.

Summary

Types

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

Functions

get_access_token(post_data)
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