Class: Xinge::Ios
Constant Summary collapse
- ENV_MAP =
{'production' => 1, 'development' => 2}
Constants inherited from Base
Base::DEFAULT_OPTIONS, Base::HOST, Base::HTTP_METHOD
Instance Method Summary collapse
-
#initialize(accessId = nil, secretKey = nil, options = {}) ⇒ Ios
constructor
A new instance of Ios.
- #pushToAllDevice(title, content, params = {}, custom_content = {}) ⇒ Object
- #pushToSingleDevice(token, title, content, params = {}, custom_content = {}) ⇒ Object
Methods inherited from Base
#application_get_app_device_num, #push_all_device, #push_cancel_timing_task, #push_get_msg_status, #push_single_account, #push_single_device, #push_tags_device, #tags_batch_del, #tags_batch_set, #tags_query_app_tags, #tags_query_tag_token_num, #tags_query_token_tags
Constructor Details
#initialize(accessId = nil, secretKey = nil, options = {}) ⇒ Ios
Returns a new instance of Ios.
7 8 9 |
# File 'lib/xinge/ios.rb', line 7 def initialize(accessId = nil, secretKey = nil, = {}) super end |
Instance Method Details
#pushToAllDevice(title, content, params = {}, custom_content = {}) ⇒ Object
13 14 15 |
# File 'lib/xinge/ios.rb', line 13 def pushToAllDevice(title, content, params={}, custom_content={}) self.push_all_device(1, (title, content, custom_content), params.merge({environment: ENV_MAP[Xinge.config[:env]]})) end |
#pushToSingleDevice(token, title, content, params = {}, custom_content = {}) ⇒ Object
10 11 12 |
# File 'lib/xinge/ios.rb', line 10 def pushToSingleDevice(token, title, content, params={}, custom_content={}) self.push_single_device(token, 1, (title, content, custom_content), params.merge({environment: ENV_MAP[Xinge.config[:env]]})) end |