twiml

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

BaseURL is our default base URL for TWIML channels (public for testing overriding)

View Source
var IgnoreSignatures = false

IgnoreSignatures controls whether we ignore signatures (public for testing overriding)

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

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

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

type Play

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

type Record

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

type Redirect

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

type Response

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

type Say

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