smsjuice/http-api-wrapper
Composer 安装命令:
composer require smsjuice/http-api-wrapper
包简介
Text Messaging wrapper for SMJuice HTTP API for PHP >=5.3
README 文档
README
SMSJuice HTTP API PHP Wrapper provides a clean way to connect to SMSJuice HTTP API servers. The main features in v1.0.0 are
- Sending messages to single/multiple individual contacts
- Sending messages to single/multiple groups on your SMSJuice account
- Check for message reports for a certain message
- Check account balance and/or remaining SMS credits
- Add new groups with contacts to your SMSJuice account
- Add new contacts (with names if needed) to existing groups on your SMSJuice account
- Get a list of all the groups on your SMSJuice account
- Get a list of all contacts from a given group on your SMSJuice account
- Delete groups (with all the contacts contained in it )on your SMSJuice account
- Delete contacts from a group on your SMSJuice account
Installation
1. Composer (Recommended way)
You can use Composer to install the SMSJuice HTTP API Wrapper. Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. To install composer follow instructions on https://getcomposer.org/doc/00-intro.md
After you install composer, use the following command in your commandline/shell to install the SMSJuice HTTP API wrapper.
$ composer require smsjuice/http-api-wrapper
...And you're good to go!
2. Download Zip
Download the Zip from https://www.smsjuice.com/text-messaging-api , and manually put it in a folder accessible from your project code.
Usage
When you are using the composer package structure then below is an example of the you could do:
$m = new Message("key", "secret"); //new message object with your key and secret
//FROM address
$m->setSender("Restaurant");
//Recipient Type. Options - 'groups' OR 'numbers'. Default:'numbers'
$m->setRecipientType("numbers");
$m->setRecipientList(array("447900239984", "447900392828")); //add contacts
$m->addToRecipientList("447900385486"); //add one contact
$m->setMessage("Hello world"); //content to send
//Send the message and get the response from the server
$result = TextMessagingService::sendMessage($m);
//JSON Result from the server
echo $result;
License
APACHE2
smsjuice/http-api-wrapper 适用场景与选型建议
smsjuice/http-api-wrapper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 08 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「sms」 「sms api」 「SMS Messaging」 「text messaging」 「sms message」 「text messaging api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 smsjuice/http-api-wrapper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 smsjuice/http-api-wrapper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 smsjuice/http-api-wrapper 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
SDK for payment gateway PlatbaMobilom.sk for PHP7.0
PHP SDK for Mobile Message SMS API
Extensible library for building notifications and sending them via different delivery channels.
Azure service bus Transport
Official PHP client for NATS messaging system
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2016-08-31