Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README with new examples.

  • Loading branch information...
commit 543940a639f864f48dd5b0abd63401f8d418f70c 1 parent aa16984
@sfreiberg authored
Showing with 22 additions and 3 deletions.
  1. +22 −3 README.md
View
25 README.md
@@ -1,5 +1,5 @@
## Overview
-This is the start of a library for [Twilio](http://www.twilio.com/). It currently only supports sending text messages at the moment. As time permits I'll work on adding more features.
+This is the start of a library for [Twilio](http://www.twilio.com/). Gotwilio supports making voice calls and sending text messages.
## License
Gotwilio is licensed under a BSD license.
@@ -7,7 +7,7 @@ Gotwilio is licensed under a BSD license.
## Installation
To install gotwilio, simply run `go get github.com/sfreiberg/gotwilio`.
-## Example
+## SMS Example
package main
@@ -23,5 +23,24 @@ To install gotwilio, simply run `go get github.com/sfreiberg/gotwilio`.
from := "+15555555555"
to := "+15555555555"
message := "Welcome to gotwilio!"
- twilio.SendTextMessage(from, to, message)
+ twilio.SendSMS(from, to, message, "", "")
+ }
+
+## Voice Example
+
+ package main
+
+ import (
+ "github.com/sfreiberg/gotwilio"
+ )
+
+ func main() {
+ accountSid := "ABC123..........ABC123"
+ authToken := "ABC123..........ABC123"
+ twilio := gotwilio.NewTwilioClient(accountSid, authToken)
+
+ from := "+15555555555"
+ to := "+15555555555"
+ callbackParams := gotwilio.NewCallbackParameters("http://example.com")
+ twilio.CallWithUrlCallbacks(from, to, callbackParams)
}
Please sign in to comment.
Something went wrong with that request. Please try again.