rsthn/rose-ext-twilio
Composer 安装命令:
composer require rsthn/rose-ext-twilio
包简介
Twilio Adapter for Rose
README 文档
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.
| Field | Type | Description | Default |
|---|---|---|---|
| sid | string |
SID of Twilio API | Required |
| token | string |
Access Token | Required |
| from | string |
Phone number used as "send from". | Required |
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"))
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2022-03-12