Project

ucpaas

0.0
No commit activity in last 3 years
No release in over 3 years
UCPAAS API wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
~> 3.0
~> 1.18

Runtime

~> 0.9
 Project Readme

云之讯 UCPAAS Ruby REST API Client

Circle CI Gem Version

https://github.com/lazing/ucpaas-rb

针对云之讯 Rest 接口(http://docs.ucpaas.com/doku.php) 做实现

使用方式

gem 'ucpaas'

# worker.rb

client = Ucpaas::Client.new 'sid', 'token'

# 短信
client.send_sms 'appid', 'tmp_id', 'mobile', 'param1', 'param2', ...

# 根据手机号码创建或获取账户
client.find_or_create_client 'appid', '+8618888888888'

# 根据号码创建双向回拨(未使用的号码会自动创建账号),最后的 hash 用于提供可选参数,参考 ucpaas 文档
client.dull_call('appid', 'from_mobile', 'to_mobile', fromSerNum: '400xxxxxxx')

贡献

新功能请直接提交 Merge Request