Skip to content

Commit

Permalink
Updating README exported client variables
Browse files Browse the repository at this point in the history
  • Loading branch information
marcossegovia committed Mar 14, 2017
1 parent ee80b12 commit 4cfdb1c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![codecov](https://codecov.io/gh/marcossegovia/apiai-go/branch/master/graph/badge.svg)](https://codecov.io/gh/marcossegovia/apiai-go)

This library allows you to integrate Api.ai natural language processing service with your Go application.
See the [docs](https://docs.api.ai/docs) for more information.
For more information see the [docs](https://docs.api.ai/docs).

## Installation

Expand All @@ -23,23 +23,23 @@ import (
)

func main() {
client, err := apiai.NewClient(
&ClientConfig{
token: "YOUR-API-AI-TOKEN",
sessionId: "YOUR_USER_SESSION_ID",
queryLang: "en", //Default en
speechLang: "en-US", //Default en-US
},
)
if err != nil{
fmt.Printf("%v", err)
}

qr, err := client.Query(Query{Query: []string{"My name is Marcos and I live in Barcelona"}})
if err != nil {
fmt.Printf("%v", err)
}
fmt.Printf("%v", qr.Result.Fulfillment.Speech)
client, err := apiai.NewClient(
&apiai.ClientConfig{
Token: "YOUR-API-AI-TOKEN",
SessionId: "YOUR_USER_SESSION_ID",
QueryLang: "en", //Default en
SpeechLang: "en-US", //Default en-US
},
)
if err != nil {
fmt.Printf("%v", err)
}
qr, err := client.Query(apiai.Query{Query: []string{"My name is Marcos and I live in Barcelona"}})
if err != nil {
fmt.Printf("%v", err)
}
fmt.Printf("%v", qr.Result.Fulfillment.Speech)
}
```
## Bugs & Issues
Expand Down

0 comments on commit 4cfdb1c

Please sign in to comment.