Baidu Could Push SDK 3.0
=========================
1. Install
$ gem install 'baidu-cloud_push'
Add baidu-cloud_push
to your Gemfile:
gem "baidu-cloud_push"
you can find the doc from rubygems.org
2. Usage
client = Baidu::CloudPush.new("you_api_key", "your_api_secret")
client.push_single_device(channel_id, title: "test", description: "desc")
client.push_single_device(channel_id, { title: "test", description: "desc" }, msg_type: 1)
3. Configuration
Baidu::CloudPush.configure do |config|
config.mode = :super # or :limited
end
4. All supported API
push_single_device(channel_id,msg,opt={})
push_all(msg,opt={})
push_batch_device(channel_ids,msg,opt={})
push_tags(tag,msg,opt={})
app_create_tag(tag)
app_del_tag(tag)
app_query_tag(tag)
report_query_msg_status(msg_ids)
report_query_timer_records(timer_id,opt={})
report_query_topic_records(topic_id,opt={})
report_statistic_device
report_statistic_topic(topic_id)
tag_add_devices(tag,channel_ids)
tag_del_devices(tag,channel_ids)
tag_device_num(tag)
timer_cancel(timer_id)
timer_query_list(opt={})
topic_query_list(opt={})
5.Contribution
Contributions are very welcome.Whether it's an issue or even a pull request.
6.License
MIT