symfony/ring-central-notifier

Symfony RingCentral Notifier 桥接器

安装: 143

依赖者: 0

建议者: 0

安全: 0

星标: 3

关注者: 4

分支: 0

类型:symfony-notifier-bridge

v7.1.1 2024-05-31 14:57 UTC

README

为 Symfony Notifier 提供 Ring Central 集成。

DSN 示例

RINGCENTRAL_DSN=ringcentral://API_TOKEN@default?from=FROM

where

  • API_TOKEN 是您的 Ring Central OAuth 2 令牌
  • FROM 是您的发送者

向消息添加选项

使用 Ring Central 消息,您可以使用 RingCentralOptions 类添加 消息选项

use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\Bridge\RingCentral\RingCentralOptions;

$sms = new SmsMessage('+1411111111', 'My message');

$options = (new RingCentralOptions())
    ->country(
        'test_country_id',
        'country_iso_code',
        'country_name',
        'country_uri',
        'country_calling_code'
    )
    // ...
    ;

// Add the custom options to the sms message and send the message
$sms->options($options);

$texter->send($sms);

资源