GithubHelp home page GithubHelp logo

yunpian-go-sdk's Introduction

yunpian-go-sdk

云片 SDK

快速开始

  • 使用云片sdk
import ypclnt "github.com/yunpian/yunpian-go-sdk/sdk"

// 发送短信
clnt := ypclnt.New("apikey")
param := ypclnt.NewParam(2)
param[ypclnt.MOBILE] = "18616020610"
param[ypclnt.TEXT] = "【云片网】您的验证码是1234"
r := clnt.Sms().SingleSend(param)

//账户:clnt.User() 签名:clnt.Sign() 模版:clnt.Tpl() 短信:clnt.Sms() 语音:clnt.Voice() 流量:clnt.Flow()

配置说明

  • 自定义sdk配置
clnt.WithConf(&YunpianConf{..})

: 参考默认配置sdk.DefOnlineConf

  • 自定义httpclient
clnt.WithHttp(customHttp) //*http.Client

源码说明

  • sdk
    • api.go 云片接口公共功能
    • client.go 云片客户端定义、配置
    • fields.go 常量定义
    • flow.go 流量
    • sign.go 签名
    • sms.go 短信
    • tpl.go 模版
    • user.go 用户
    • voice.go 语音
    • util.go 工具函数
  • 分支说明
    • master最新稳定发布版本
    • develop待发布版本,贡献的代码请pull request到这里:)

联系我们

云片支持 QQ

SDK开源QQ群

SDK开源QQ群

文档链接

开源SDK列表

yunpian-go-sdk's People

Contributors

dzh avatar sqj8899 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yunpian-go-sdk's Issues

没有mobile_stat字段

sdk里面没有mobile_stat字段,但是api文档里面写着有这个参数。NewParams返回的类型为map[string]string, 而mobile_stat是boolean类型,这个参数怎么传?"true" ? "1" ? 我试了下好像不起作用啊

服务器请求发送验证码时候,ip为什么是客户端的?

利用的 该go sdk
在调用 r := clnt.Sms().SingleSend(param) 时候
返回错误 ,请将ip ******* 添加到 ip白名单
发现该ip为客户端ip 而不是 服务器公网固定ip,
应用程序运行在 容器中, nginx做反向代理~~ 有什么影响吗?
急~~谢谢

batchsend没有errorMsg

version: v0.0.0-20171206

其它发送方式通过sdk发送短信,收到的返回值result能正常获取code及ErrorMsg,batchSend,不论发送成功还是失败,均无法正常获取Code及ErrorMsg

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.