A Smalltalk library for communicating with the Twilio REST API (http://twilio.com).
Name | Smalltalk Version | Version |
---|---|---|
Pharo Smalltalk | 4.0, 5.0, 6.0, 6.1 | v0.2.2 |
Pharo Smalltalk | 11.0, 12.0 | Latest Version |
You can load # twilio-smalltalk using Metacello
Metacello new
baseline: 'Twilio';
repository: 'github://newapplesho/twilio-smalltalk/pharo-repository';
baseline: 'Twilio';
load.
You can read official documentation here.
TwilioSettings default accountSid: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
TwilioSettings default authToken: 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'.
client := TwilioRestClient new.
client makeCallTo: '+14155551212' from: '+14158675309' url: 'http://demo.twilio.com/docs/voice.xml'.
client := TwilioRestClient new.
client sendTo: '+15558675309' from: '+14158141829' message: 'Sent from Pharo Smalltalk.'.
client sendTo: '+15558675309' from: '+14158141829' message: 'Pharo SmalltalkからSMSを送信'.
client := TwilioRestClient new.
client sendTo: '+15558675309' from: '+14158141829' message: 'Sent from Pharo Smalltalk.' mediaUrl: 'http://www.example.com/hearts.png'.
client := TwilioRestClient new.
client accounts usageRecords list.
client := TwilioRestClient new.
"Return a single UsageRecord per usage category, for yesterday's usage only."
client accounts usageRecords yesterday list.
"Return a single UsageRecord per usage category, for this month's usage only."
client accounts usageRecords thisMonth list.
client := TwilioRestClient new.
"Returns a representation of an account."
client getAccount: 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
client := TwilioRestClient new.
[ client sendTo: '+1' from: '+ 14158141829' message: 'Handling Exceptions test'.] on: TwilioRestException do:[:ex | ex inspect ].