razor-informatics/ri-notifier-php
最新稳定版本:v0.1.3
Composer 安装命令:
composer require razor-informatics/ri-notifier-php
包简介
Official PHP SDK for Razor Informatics Notifier Project
README 文档
README
This SDK provides easier work with Razor Informatics Notifier API for applications written in PHP.
POSTMAN Collection
Documentation
To get the depth details of the api check API docs here.
Install
You can install the PHP SDK via composer or by downloading the source
Via Composer
The recommended way to install the SDK is with Composer.
composer require razor-informatics/ri-notifier-php
Usage
The SDK needs to be instantiated using your API key, which you can get from the project settings here.
Send Message Example
use RazorInformatics\RiNotifierPhp; $apiKey = 'YOUR_API_KEY'; $razor = new RiNotifierPhp\Notifier($apiKey); $results = $razor->message()->send([ 'phone_number' => 0700XXXYYY, 'message' => "Howdy welcome to the team" ]); print_r($results);
Fetch message Example
details of a previous sent message.
use RazorInformatics\RiNotifierPhp; $apiKey = 'YOUR_API_KEY'; $razor = new RiNotifierPhp\Notifier($apiKey); $results = $razor->message()->fetchMessage('MESSAGE ID'); print_r($results);
Get Account Details Example
The data available is project details & current account balance
use RazorInformatics\RiNotifierPhp; $apiKey = 'YOUR_API_KEY'; $razor = new RiNotifierPhp\Notifier($apiKey); $results = $razor->account()->getDetails(); print_r($results);
Get Gateway Balance Example
Get the account balance of gateway selected when available. Available gateways are
- Notifier (project balance)
- Celcom Africa
- Emreign
- Africa’s Talking
- Onfon Media
- Web SMS
- more coming soon.
use RazorInformatics\RiNotifierPhp; $apiKey = 'YOUR_API_KEY'; $razor = new RiNotifierPhp\Notifier($apiKey); $results = $razor->gateway(Constants::GATEWAY_NOTIFIER)->details(); print_r($results);
统计信息
- 总下载量: 106
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-18