定制 instasent/instasent-php-lib 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

instasent/instasent-php-lib

最新稳定版本:0.1.4

Composer 安装命令:

composer require instasent/instasent-php-lib

包简介

A PHP wrapper library for Instasent's API

README 文档

README

Welcome to Instasent PHP SDK. This repository contains PHP SDK for Instasent's REST API.

Notice!

Verify product is currently deprecated and will be removed in the next release. The same functionality can be easily implemented by sending an SMS. If you need help migrating please contact us

Installation

The easiest way to install the SDK is either via composer:

composer require instasent/instasent-php-lib

or manually by downloading the source:

Click here to download the source (.zip)

Once you download the library, move the instasent-php-lib folder to your project directory and then include the library file:

require_once(__DIR__ . '/path/to/lib/Abstracts/InstasentClient.php');
require_once(__DIR__ . '/path/to/lib/SmsClient.php');

Usage

Check the examples directory to see working examples of this SDK usage

Sending an SMS

$instasentClient = new Instasent\SmsClient('my-token');
$response = $instasentClient->sendSms('Company', '+34666666666', 'test message');

echo $response['response_code'];
echo $response['response_body'];

If you want to send an Unicode SMS (i.e with 😀 emoji) you only need to replace sendSms call to sendUnicodeSms

$response = $instasentClient->sendUnicodeSms('Company', '+34666666666', 'Unicode test: ña éáíóú 😀');

Available actions

SMS
SmsClient::sendSms(sender, to, text)
SmsClient::sendUnicodeSms(sender, to, text)
SmsClient::getSms(page, per_page)
SmsClient::getSmsById(message_id)

LOOKUP
LookupClient::doLookup(to)
LookupClient::getLookups(page, per_page)
LookupClient::getLookupById(id)

ACCOUNT
instasent::getAccountBalance()

Full documentation

Full documentation of the API can be found at http://docs.instasent.com/

Getting help

If you need help installing or using the SDK, please contact Instasent Support at support@instasent.com

If you've instead found a bug in the library or have a feature request, go ahead and open an issue or pull request!

统计信息

  • 总下载量: 39.12k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-10