中国各个短信平台 Ruby 接口,现支持云片网、推立方、亿美软通、短信宝、畅友网络
MIT License
19
Gemfile:
gem 'china_sms'
:
$ bundle
$ gem install china_sms
# :tui3, :yunpian, :smsbao, :chanyoo, :emay, luosimao
ChinaSMS.use :tui3, username: 'YOUR_USERNAME', password: 'YOUR_PASSWORD'
ChinaSMS.to '13912345678', '[Test]China SMS gem has been released.'
# :yunpian
# content()
#
# Hash
#
#
# :tpl_id 2
ChinaSMS.use :yunpian, password: 'YOUR_API_KEY'
#
ChinaSMS.to '13912345678', '[Test]China SMS gem has been released.'
ChinaSMS.to '13912345678', 'China SMS gem has been released.Test' # luosimao
#
# "#code##company#
tpl_params = { code: 123, company: '19wu' }
ChinaSMS.to '13912345678', tpl_params, tpl_id: 1
#
ChinaSMS.voice_to '13912345678', '6626'
git clone [email protected]:saberma/china_sms.git
cd china_sms
bundle console # irb