nubank_api v1.1.0 NubankAPI.Auth
NubankAPI.Auth is responsable for handle authentication.
It has a login function that authenticates the user, getting the access token, it's expiration datetime and the refresh token, as well the link for other API features.
Future implementation will be create the refresh token function.
Link to this section Summary
Functions
Get auth token
Link to this section Functions
Link to this function
get_token(login, password)
get_token(login, password)
get_token(String.t(), String.t()) ::
{:ok, NubankAPI.Access.t()} | {:error, any()}
get_token(String.t(), String.t()) :: {:ok, NubankAPI.Access.t()} | {:error, any()}
Get auth token.
It will return a Map with with the structure: %NubankAPI.Access{ access_token: "access token in string", links: %{}, refresh_before: "an expiration DateTime in UTC", refresh_token: "refresh token in string" token_type: "bearer" }
Examples
iex> NubankAPI.transactions(access)
{:ok, []}