https://github.com/firstthumb/apiai-elixir-client
Api.ai Elixir Client ( No More Development )
https://github.com/firstthumb/apiai-elixir-client
apiai elixir
Last synced: 4 months ago
JSON representation
Api.ai Elixir Client ( No More Development )
- Host: GitHub
- URL: https://github.com/firstthumb/apiai-elixir-client
- Owner: firstthumb
- License: mit
- Created: 2017-08-18T08:26:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-24T13:34:38.000Z (almost 9 years ago)
- Last Synced: 2025-12-27T20:10:12.804Z (6 months ago)
- Topics: apiai, elixir
- Language: Elixir
- Homepage:
- Size: 13.7 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://hex.pm/packages/apiai)
[](https://travis-ci.org/firstthumb/apiai-elixir-client)
# Apiai
It is an Elixir client library for the Api.ai API.
## Features
Apiai Elixir client currently supports:
1. Do query `ApiAi.query/6`
2. Crud operation on intents `ApiAi.get_intent/1`, `ApiAi.delete_intent/1`, `ApiAi.add_intent/5` and `ApiAi.save_intent/6`
Adding endpoints should be relatively simple, and I'm open to pull requests.
## Installation
The package can be installed as:
1. Add apiai to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:apiai, "~> 0.1.2"}
]
end
```
2. Ensure apiai is started before your application:
```elixir
def application do
[applications: [:apiai]]
end
```
## Usage
Write your Api.ai credentials to config file
```elixir
config :apiai,
client_access_token: "CLIENT_ACCESS_TOKEN_HERE",
developer_access_token: "DEVELOPER_ACCESS_TOKEN_HERE"
```
```elixir
case ApiAi.query "Hi", "session_id" do
{:ok, response} ->
IO.inspect response
{:error, error}
IO.inspect error
end
```