Bexio Maps
Mix.install([
{:kino, "~> 0.14.2"},
{:kino_maplibre, "~> 0.1.13"},
{:bexio_api_client, "~> 0.7.0"}
])
Connecting and OAuth
client = BexioApiClient.new(System.get_env("LB_BEXIO_MAP_CLIENT_ID"), System.get_env("LB_BEXIO_MAP_CLIENT_SECRET"), System.get_env("LB_BEXIO_MAP_REFRESH_TOKEN"))
languages = BexioApiClient.Others.fetch_languages(client)
countries = BexioApiClient.Others.fetch_countries(client)
contact_groups = BexioApiClient.Contacts.fetch_contact_groups(client)
contact_sectors = BexioApiClient.Contacts.fetch_contact_sectors(client)
BexioApiClient.Contacts.search_contacts(
client,
[BexioApiClient.SearchCriteria.part_of(:contact_group_ids, [2])],
false,
)