From d824fecc8f955fd877a7a8c2fbf465779beaa787 Mon Sep 17 00:00:00 2001 From: Fabrizio Moscon Date: Sun, 15 Jan 2017 12:08:30 +0000 Subject: [PATCH 1/3] TwiML: add more properties for NumberOpts and ClientOpts --- twiml/noun_client.go | 7 +++++-- twiml/noun_number.go | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/twiml/noun_client.go b/twiml/noun_client.go index ec13412..9697358 100644 --- a/twiml/noun_client.go +++ b/twiml/noun_client.go @@ -10,8 +10,11 @@ type client struct { // // https://www.twilio.com/docs/api/twiml/client type ClientOpts struct { - URL string `xml:"url,attr,omitempty"` - Method string `xml:"method,attr,omitempty"` + URL string `xml:"url,attr,omitempty"` + Method string `xml:"method,attr,omitempty"` + StatusCallbackEvent string `xml:"statusCallbackEvent,attr,omitempty"` + StatusCallback string `xml:"statusCallback,attr,omitempty"` + StatusCallbackMethod string `xml:"statusCallbackMethod,attr,omitempty"` } func addClient(t twimlResponse, opts *ClientOpts, clients []string) { diff --git a/twiml/noun_number.go b/twiml/noun_number.go index c4169af..ce57d6f 100644 --- a/twiml/noun_number.go +++ b/twiml/noun_number.go @@ -10,9 +10,12 @@ type number struct { // // https://www.twilio.com/docs/api/twiml/number type NumberOpts struct { - SendDigits string `xml:"sendDigits,attr,omitempty"` - URL string `xml:"url,attr,omitempty"` - Method string `xml:"method,attr,omitempty"` + SendDigits string `xml:"sendDigits,attr,omitempty"` + URL string `xml:"url,attr,omitempty"` + Method string `xml:"method,attr,omitempty"` + StatusCallbackEvent string `xml:"statusCallbackEvent,attr,omitempty"` + StatusCallback string `xml:"statusCallback,attr,omitempty"` + StatusCallbackMethod string `xml:"statusCallbackMethod,attr,omitempty"` } func addNumber(t twimlResponse, opts *NumberOpts, numbers []string) { From c89ffd5c07e7ee1e7d34de201d648442b502081c Mon Sep 17 00:00:00 2001 From: Fabrizio Moscon Date: Sat, 6 May 2017 13:47:56 +0100 Subject: [PATCH 2/3] add new Twiml Dial parameters --- twiml/verb_dial.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/twiml/verb_dial.go b/twiml/verb_dial.go index a5db7ba..29b469d 100644 --- a/twiml/verb_dial.go +++ b/twiml/verb_dial.go @@ -12,14 +12,17 @@ type dial struct { // // https://www.twilio.com/docs/api/twiml/dial type DialOpts struct { - Action string `xml:"action,attr,omitempty"` - Method string `xml:"method,attr,omitempty"` - Timeout int `xml:"timeout,attr,omitempty"` - HangupOnStar bool `xml:"hangupOnStar,attr,omitempty"` - TimeLimit int `xml:"timeLimit,attr,omitempty"` - CallerID string `xml:"callerId,attr,omitempty"` - Record string `xml:"record,attr,omitempty"` - Trim string `xml:"trim,attr,omitempty"` + Action string `xml:"action,attr,omitempty"` + Method string `xml:"method,attr,omitempty"` + Timeout int `xml:"timeout,attr,omitempty"` + HangupOnStar bool `xml:"hangupOnStar,attr,omitempty"` + TimeLimit int `xml:"timeLimit,attr,omitempty"` + CallerID string `xml:"callerId,attr,omitempty"` + Record string `xml:"record,attr,omitempty"` + Trim string `xml:"trim,attr,omitempty"` + RecordingStatusCallback string `xml:"recordingStatusCallback,attr,omitempty"` + RecordingStatusCallbackMethod string `xml:"recordingStatusCallbackMethod,attr,omitempty"` + RingTone string `xml:"ringTone,attr,omitempty"` } type dialBody interface { From bde0c4c0a4adef33be21e330dd4bb90d2c66d900 Mon Sep 17 00:00:00 2001 From: Fabrizio Moscon Date: Sat, 6 May 2017 14:52:32 +0100 Subject: [PATCH 3/3] update readme --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index e473736..c08ee8a 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ You can generate a callback parser for all Twilio callbacks that will publish th [See the SMS example below for an example of how this works.](#sms_example) - - ## Installation ``` @@ -44,9 +42,6 @@ act := twilogo.NewAccountFromEnv() act := twiliogo.NewAccount("AccountSid", "AccountToken") ``` - - - ### Making a call ```go @@ -59,9 +54,6 @@ resp, err := act.Voice.Call(voice.Post{ }) ``` - - - ### Sending a text - with a callback handler ```go