GithubHelp home page GithubHelp logo

yunpian-csharp-sdk's Introduction

yunpian-csharp-sdk

云片 SDK

快速开始

//初始化clnt,使用单例方式
var clnt = new YunpianClient("apikey").Init();

//发送短信API
var param = new Dictionary<string, string>
            {
                [Const.Mobile] = "18616020***",
                [Const.Text] = "【云片网】您的验证码是1234"
            };
var r = clnt.Sms().SingleSend(param);
//获取返回结果, 返回码:r.Code, 返回码描述:r.Msg, API结果:r.Data, 其他说明:r.Detail, 调用异常:r.E

//账户:clnt.User().* 签名:clnt.Sign().* 模版:clnt.Tpl().* 短信:clnt.Sms().* 视频短信:clnt.VideoSms().* 语音:clnt.Voice().* 短链接:clnt.ShortUrl().*

//释放clnt
clnt.Dispose();

配置说明

  • 自定义配置
    • 使用构造器 new YunpianClient(string apikey,Dictionary<string, string> props)
    • props内容参考YunpianConf

源码说明

  • 工程源码
    • yunpian-csharp-sdk 云片SDK源码工程,namespace=Yunpian.Sdk
      • Api/ 云片接口源码
      • Model/ 模型对象定义
      • Util/ 工具类
      • YunpianClient 接口调用客户端
      • YunpianConf 客户端配置
    • yunpian-csharp-sdk-test 源码单元测试工程,namespace=Yunpian.Sdk.Test
      • Api/ 云片接口单元测试
  • 开发API可参考单元测试
    • 在TestYunpianApi定义TestApikey,然后执行测试工程Api/里的单元测试
  • YunpianClient使用单例方式,不要每次new
  • 分支说明: master是发布版本,develop是待发布的分支(开源贡献可以pull request到develop)

环境要求

Windows

  • 需要.NET 2.0 及以上.
  • 需要 Visual Studio 2010及以上.

Linux/Mac

  • 需要 Mono 3.12 及以上.

联系我们

云片支持 QQ

SDK开源QQ群

SDK开源QQ群

文档链接

yunpian-csharp-sdk's People

Contributors

cuncle avatar dzh avatar sqj8899 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.