GithubHelp home page GithubHelp logo

yunpian-php-sdk's Introduction

yunpian-php-sdk

云片 SDK

快速开始

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

: master是最新稳定版。我们会更新到Packagist

  • 使用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

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

  • 默认配置文件 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

视频教程

使用视频教程

联系我们

云片支持 QQ

SDK开源QQ群

SDK开源QQ群

文档链接

yunpian-php-sdk's People

Contributors

dzh avatar bingone avatar sqj8899 avatar a-long-way avatar cuncle avatar jiacheo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.