webtoolsnz/swift-sdk
Composer 安装命令:
composer require webtoolsnz/swift-sdk
包简介
PHP SDK for the Swift SMS campaign tool
关键字:
README 文档
README
Swift SDK
An easy to use PHP SDK for the Swift SMS Campaign Management Tool
Installation
Install webtoolsnz/swift-sdk using Composer.
$ composer require webtoolsnz/swift-sdk
Usage Examples
Retrieve list of campaigns
use \webtoolsnz\Swift\Swift; use \webtoolsnz\Swift\Resources\Recipient; $apiKey = 'INSERT_YOUR_API_KEY_HERE'; $endPoint = 'https://my.swift-app.com.au/api'; $swift = new Swift($endPoint, $apiKey); $campaigns = $swift->getCampaigns(); var_dump($campaigns);
Add recipient to campaign
use \webtoolsnz\Swift\Swift; use \webtoolsnz\Swift\Resources\Recipient; $apiKey = 'INSERT_YOUR_API_KEY_HERE'; $endPoint = 'https://my.swift-app.com.au/api'; $swift = new Swift($endPoint, $apiKey); $recipient = new Recipient(); $recipient->first_name = 'Philip'; $recipient->last_name = 'Fry'; $recipient->campaign_id = 123; $recipient->mobile_number = "021234567"; $recipient->account_id = uniqid(); var_dump($swift->createRecipient($recipient));
Retrieve a recipient
This will also include the recipients survey responses, if available.
use \webtoolsnz\Swift\Swift; use \webtoolsnz\Swift\Resources\Recipient; $apiKey = 'INSERT_YOUR_API_KEY_HERE'; $endPoint = 'https://my.swift-app.com.au/api'; $swift = new Swift($endPoint, $apiKey); var_dump($swift->getRecipient(123));
License
swift-php-sdk is open-sourced software licensed under the MIT License (MIT). Please see LICENSE for more information.
统计信息
- 总下载量: 38
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-17