BexioApiClient (bexio_api_client v0.7.0)
base functionality like refreshing the access token.
The API Documentation for Bexio can be found under https://docs.bexio.com.
Fields or arguments with date time reference expect them in the time zone Europe/Zurich.
requirements
Requirements:
- Http Client: ** Req: the api client depends on Req.
Link to this section Summary
Functions
Fetch a new access token for the given refresh token.
Creates a new client using the never ending all powerful API Token.
Creates a new client using the client id, client secret and refresh token. Be aware that getting this information is part of the OpenID flow which is not in the scope of this library.
Removes all expired access tokens from the ETS table.
Link to this section Functions
access_token(refresh_token, client_id, client_secret)
@spec access_token(String.t(), String.t(), String.t()) :: {:ok, String.t(), integer()} | {:error, any()}
Fetch a new access token for the given refresh token.
arguments
Arguments:
refresh_token
-> the refresh token we need the access key forclient_id
-> the client id of our application that also got the refresh tokenclient_secret
-> the client secret of our application
response
Response
}
new(api_token)
@spec new(String.t()) :: Req.Request.t()
Creates a new client using the never ending all powerful API Token.
new(client_id, client_secret, refresh_token)
@spec new(String.t(), String.t(), String.t()) :: Req.Request.t()
Creates a new client using the client id, client secret and refresh token. Be aware that getting this information is part of the OpenID flow which is not in the scope of this library.
remove_expired_access_tokens()
Removes all expired access tokens from the ETS table.