https://github.com/dragonraid/gowit
Go library for Wit.ai https://wit.ai
https://github.com/dragonraid/gowit
Last synced: 12 months ago
JSON representation
Go library for Wit.ai https://wit.ai
- Host: GitHub
- URL: https://github.com/dragonraid/gowit
- Owner: dragonraid
- Created: 2018-09-03T20:37:20.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-06T08:50:16.000Z (almost 5 years ago)
- Last Synced: 2024-12-28T09:20:13.046Z (over 1 year ago)
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# gowit
> NOTE: Deprecated in favour of this [project](https://github.com/wit-ai/wit-go)
[](https://travis-ci.org/dragonraid/gowit)
`gowit` is the Go SDK for [Wit.ai](https://wit.ai/)
**This is WIP**
## Install
Using `go get`:
```
go get github.com/dragonraid/gowit
```
From source:
```
git clone https://github.com/dragonraid/gowit $GOPATH/src/github.com/dragonraid/
go install $GOPATH/src/github.com/dragonraid/gowit
```
## Usage:
For minimal working example you need to specify `WIT_API_TOKEN` environment variable. Then you can do:
```
witAPI := wit.New()
body, _, err := witApi.Message("YOUR MESSAGE").Do()
```
See the also `examples` directory
## API
### Versioning
The default API version is `20180527`. You can target a specific version by setting the env variable `WIT_API_VERSION`.
### Overview
`gowit` provides interaction with following endpoints:
* `Message` - [the Wit message API](https://wit.ai/docs/http/20170307#get--message-link)
## Optional settings
You have two options how to setup your client behaviour
* Environment variables
* `WIT_API_URL` (defaults to `https://api.wit.ai`)
* `WIT_API_VERSION` (defaults to `20180527`)
* `WIT_API_VERBOSE` (defaults to `false`)
* Wit struct
```
witApi := &wit.Wit{
Token: "",
URL: "",
Version: "",
Verbose: "",
}
```