View Source chalk-elixir
Elixir Client for Chalk Online Queries.
usage
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
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
})