twilio

package
v0.0.147 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2019 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BaseURL = `https://api.twilio.com`
View Source
var IgnoreSignatures = false

Functions

func NewClient

func NewClient(accountSID string, authToken string) ivr.Client

NewClient creates a new Twilio IVR client for the passed in account and and auth token

func NewClientFromChannel

func NewClientFromChannel(channel *models.Channel) (ivr.Client, error)

NewClientFromChannel creates a new Twilio IVR client for the passed in account and and auth token

Types

type CallResponse

type CallResponse struct {
	SID    string `json:"sid"`
	Status string `json:"status"`
}

CallResponse is our struct for a Twilio call response

type Gather added in v0.0.74

type Gather struct {
	XMLName     string        `xml:"Gather"`
	NumDigits   int           `xml:"numDigits,attr,omitempty"`
	FinishOnKey string        `xml:"finishOnKey,attr,omitempty"`
	Timeout     int           `xml:"timeout,attr,omitempty"`
	Action      string        `xml:"action,attr,omitempty"`
	Commands    []interface{} `xml:",innerxml"`
}

type Hangup added in v0.0.74

type Hangup struct {
	XMLName string `xml:"Hangup"`
}

type Play added in v0.0.74

type Play struct {
	XMLName string `xml:"Play"`
	URL     string `xml:",chardata"`
}

type Record added in v0.0.74

type Record struct {
	XMLName string `xml:"Record"`
	Action  string `xml:"action,attr,omitempty"`
}

type Redirect added in v0.0.74

type Redirect struct {
	XMLName string `xml:"Redirect"`
	URL     string `xml:",chardata"`
}

type Response added in v0.0.74

type Response struct {
	XMLName  string        `xml:"Response"`
	Message  string        `xml:",comment"`
	Gather   *Gather       `xml:"Gather"`
	Commands []interface{} `xml:",innerxml"`
}

type Say added in v0.0.74

type Say struct {
	XMLName string `xml:"Say"`
	Text    string `xml:",chardata"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL