Permalink
Browse files

Updated README with new examples.

  • Loading branch information...
1 parent aa16984 commit 543940a639f864f48dd5b0abd63401f8d418f70c @sfreiberg committed May 25, 2012
Showing with 22 additions and 3 deletions.
  1. +22 −3 README.md
View
@@ -1,13 +1,13 @@
## 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.
## 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)
}

0 comments on commit 543940a

Please sign in to comment.