gmail v0.0.6 Gmail.OAuth2.Client
Summary
Functions
Checks if an access token has expired
Gets the config for a Gmail API connection, including a refreshed access token
Refreshes an expired access token
Functions
Specs
access_token_expired?(Gmail.OAuth2.Opts.t) :: boolean
Checks if an access token has expired
Examples
iex> Gmail.OAuth2.Client.access_token_expired?(%Gmail.OAuth2.Opts{expires_at: 1})
true
iex> Gmail.OAuth2.Client.access_token_expired?(%Gmail.OAuth2.Opts{expires_at: (Timex.Date.to_secs(Timex.Date.now) + 10)})
false
Specs
get_config :: Gmail.OAuth2.Opts.t
Gets the config for a Gmail API connection, including a refreshed access token
Specs
refresh_access_token(Gmail.OAuth2.Opts.t) :: {:ok, Gmail.OAuth2.Opts.t}
Refreshes an expired access token