BexioApiClient (bexio_api_client v0.1.2)

Base Module for the API Client

Link to this section Summary

Link to this section Functions

Link to this function

create_client(api_token, opts \\ [])

@spec create_client(
  String.t(),
  keyword()
) :: Tesla.Client.t()

Create Tesla API Client.

This must be given a token from https://office.bexio.com/admin/apiTokens#/ which will then be used as bearer token. The client can then be used everywhere where it's useful.

It also allows an optional setup for retrying to allow to limit if needed. The defaults are listed below:

  • :delay (500)
  • :max_retries (10)
  • :max_delay (4_000)
  • :log_level (:info)
  • :debug (false)
  • :adapter (nil)