rsthn / rose-ext-twilio
Twilio Adapter for Rose
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:rose-extension
Requires
- rsthn/rose-extension-installer: *
- twilio/sdk: ^6.24
This package is auto-updated.
Last update: 2024-11-12 14:17:47 UTC
README
This extension adds expression functions to Rose to send SMS using Twilio.
Installation
composer require rsthn/rose-ext-twilio
Configuration Section: Twilio
The configuration section should have the default settings that the extension will use when using the twilio::send
function. If you want to change these runtime, use twilio::config
first.
Expression Functions
twilio::send
targetPhoneNumber:string message:string
Sends an SMS to the specified phone number.
Returns: { error:string, errorCode:string, sid:string, price:number }
Example:
(twilio::send "+11115558888" "Hello World")
twilio::config
settings:object
Changes one or more configuration settings. The settings
object should have one or more fields just as the configuration section.
Returns: boolean
Example:
(twilio::config (& "sid" "SID_VALUE"))