vdbelt/inmobile-sms-api

PHP 封装库,用于与 Inmobile SMS API 交互

v2.0.2 2020-04-01 10:53 UTC

This package is auto-updated.

Last update: 2024-08-29 04:13:02 UTC


README

Inmobile SMS API 客户端库可用于与 Inmobile API 交互。

安装

使用 composer 需要此包

composer require vdbelt/inmobile-sms-api

基本用法

<?php

use Inmobile\Text;
use Inmobile\Gateway;
use Inmobile\Message;
use Inmobile\Recipient;

$gateway = Gateway::create('apiKey');

$message = Message::create('Hello world!')->from('My App')->to('4512345678');

$gateway->addMessage($message);
$gateway->send();


// Other capabilities:
$text = (new Text('Hello World'))->flash()->encoding('utf-8');

$recipients = [
    (new Recipient('4512345678'))->withMessageId('my-id'),
    '450000000'
];

Message::create($text)->to($recipients)->from('My App')->doNotRespectBlacklist()->scheduleAt(date_create('+1 hour'));

报告问题

使用 Github 问题跟踪器 或通过电子邮件 martin@vandebelt.dk 报告问题。

版权

版权所有 Martin van de Belt。有关详细信息,请参阅 LICENSE。