chalk-elixir

DialyxirIntegration testsPublish to Hex

Hex.pmHexdocs.pmHex.pmHex.pm

Elixir Client for Chalk Online Queries.

Usage

Online queries are executed by calling "Chalk.Query.online" and passing inputs and expected outputs as descibed in the Chalk API documentation.

Chalk.Query.online(%{
inputs: %{
"user.id": 1
},
outputs: [
"user.id"
]
})

Authentication

The Chalk client uses authentication credentials set in the environment variables CHALK_CLIENT_ID and CHALK_CLIENT_SECRET.
Credentials can be generated on the Chalk dashboard or [via api](https://docs.chalk.ai/docs/online-authentication#fetching-an-access-token.

The credentials can also be passed directly when invoking the client.

Chalk.Query.online(%{
inputs: %{
"user.id": 1
},
outputs: [
"user.id"
]
}, %{
client_id: THE_CLIENT_ID,
secret: THE_SECRET
})