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

Link to this function

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 for
  • client_id -> the client id of our application that also got the refresh token
  • client_secret -> the client secret of our application

response

Response

}

@spec new(String.t()) :: Req.Request.t()

Creates a new client using the never ending all powerful API Token.

Link to this function

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.

Link to this function

remove_expired_access_tokens()

Removes all expired access tokens from the ETS table.