damondouglas / go.actions

Encodes and decodes dialogflow fulfillments through Google Actions API requests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

godoc

About

go.actions encodes and decodes dialogflow fulfillment requests and responses sent through Google Actions.

Install

go get github.com:damondouglas/go.actions

Usage

import (
    "github.com/damondouglas/go.actions/v2/dialogflow"
    "encoding/json"
)

func HandleAction(w http.ResponseWriter, r *http.Request) {
    var req *dialogflow.Request
	if err := json.NewDecoder(r).Decode(&req); err != nil {
        // Handle err
    }

    // Do something with req
}

About

Encodes and decodes dialogflow fulfillments through Google Actions API requests.


Languages

Language:Go 99.8%Language:Shell 0.2%