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列表

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.