2017 © Pedro Peláez
 

library yunpian-php-sdk

image

yunpian/yunpian-php-sdk

  • Friday, April 6, 2018
  • by dzh
  • Repository
  • 10 Watchers
  • 37 Stars
  • 16,240 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 13 Forks
  • 4 Open issues
  • 8 Versions
  • 22 % Grown

The README.md

yunpian-php-sdk

云片 SDK, (*1)

快速开始

  • 添加composer依赖
"require": {
        "yunpian/yunpian-php-sdk" : "~1.0"
    }

: master是最新稳定版。我们会更新到Packagist, (*2)

  • 使用YunpianClient
use \Yunpian\Sdk\YunpianClient;

//初始化client,apikey作为所有请求的默认值
$clnt = YunpianClient::create($apikey);

$param = [YunpianClient::MOBILE => '18616020000',YunpianClient::TEXT => '【云片网】您的验证码是1234'];
$r = $clnt->sms()->single_send($param);
//var_dump($r);
if($r->isSucc()){
    //$r->data()
}

//账户$clnt->user() 签名$clnt->sign() 模版$clnt->tpl() 短信$clnt->sms() 语音$clnt->voice() 流量$clnt->flow() 视频短信$clnt->vsms()

: v1.0开始使用composer管理工程。不兼容之前版本,若需要可从github下载0.0.1, (*3)

配置说明 (默认配置就行)

  • 默认配置文件 src/yunpian.ini
  • 构造器配置
    • YunpianClient::create($apikey);
    • YunpianClient::create($apikey,$conf);
  • apikey的优先级 函数的$param[YunpianConstant::APIKEY] > 构造器的$apikey > 构造器的$conf[YunpianConstant::YP_APIKEY] > yunpian.ini

源码说明 yunpian-php-sdk

  • 工程使用composer构造,php5.6 or higher
  • 开发API可参考单元测试 tests/Api
  • 执行单元测试 phpunit tests,安装phpunit

视频教程

使用视频教程, (*4)

联系我们

云片支持 QQ, (*5)

SDK开源QQ群, (*6)

SDK开源QQ群, (*7)

文档链接

The Versions

06/04 2018

0.0.1

0.0.1.0

  Sources   Download

19/03 2018

dev-master

9999999-dev https://github.com/yunpian/yunpian-php-sdk

Yunpian PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dzh

sdk yunpian

28/12 2017

1.0.2

1.0.2.0 https://github.com/yunpian/yunpian-php-sdk

Yunpian PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dzh

sdk yunpian

28/12 2017

dev-develop

dev-develop https://github.com/yunpian/yunpian-php-sdk

Yunpian PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dzh

sdk yunpian

10/08 2017

1.0.2.x-dev

1.0.2.9999999-dev https://github.com/yunpian/yunpian-php-sdk

Yunpian PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dzh

sdk yunpian

27/03 2017

1.0.1

1.0.1.0 https://github.com/yunpian/yunpian-php-sdk

Yunpian PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dzh

sdk yunpian

14/03 2017

1.0.0

1.0.0.0 https://github.com/yunpian/yunpian-php-sdk

Yunpian PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dzh

sdk yunpian

14/03 2017

0.9

0.9.0.0 https://github.com/yunpian/yunpian-php-sdk

Yunpian PHP SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dzh

sdk yunpian