0.0
No commit activity in last 3 years
No release in over 3 years
容联·云通讯SDK Ruby版 提供短信,语音验证码,电话回拨和外呼通知等功能
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
 Project Readme

YunTongXun Api

容联·云通讯SDK for Ruby

DONE: 短信 DONE: 语音验证码 DONE: 电话回拨 DONE: 外呼通知

Installation

Add this line to your application's Gemfile:

gem 'yuntongxun_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yuntongxun_api

Usage

Setting

Create config\initializers\yuntongxun.rb

YunTongXun.setup do |config|
  config.server = 'https://app.cloopen.com:8883'
  config.account_sid = ''
  config.auth_token = ''
  config.app_id = ''
  config.version = '2013-12-26'
end

SMS

params = {
  to: '',
  templateId: '',
  datas: '',
}

YunTongXun::Sms.send(params)

语音验证

params = {
  to: '',
  verifyCode: '',
}

YunTongXun::Voice.voice_verify(params)

电话回拨

params = {
  from: '',
  to: ''
}

YunTongXun::Voice.double_call(params)

取消回拨

params = {
  callSid: '',
  type: '',
}

YunTongXun::Voice.cancel_call(params)

外呼通知

params = {
  to: '',
}

YunTongXun::Voice.landing_call(params)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

The gem is available as open source under the terms of the MIT License.