Module: JPush::Push
- Extended by:
- Helper::ArgumentHelper, Push
- Included in:
- Push
- Defined in:
- lib/jpush/push.rb,
lib/jpush/push/audience.rb,
lib/jpush/push/notification.rb,
lib/jpush/push/push_payload.rb
Defined Under Namespace
Classes: Audience, Notification, PushPayload
Constant Summary
Constants included from Helper::ArgumentHelper
Helper::ArgumentHelper::MAX_ALIAS_ARRAY_SIZE, Helper::ArgumentHelper::MAX_MSG_IDS_ARRAY_SIZE, Helper::ArgumentHelper::MAX_REGISTRATION_ID_ARRAY_SIZE, Helper::ArgumentHelper::MAX_TAG_ARRAY_MAX_BYTESIZE, Helper::ArgumentHelper::MAX_TAG_ARRAY_SZIE
Constants included from Helper::Argument
Helper::Argument::MAX_ALIAS_BYTESIZE, Helper::Argument::MAX_TAG_BYTESIZE, Helper::Argument::MOBILE_RE
Instance Method Summary collapse
-
#push(push_payload) ⇒ Object
POST api.jpush.cn/v3/push 向某单个设备或者某设备列表推送一条通知、或者消息.
-
#validate(push_payload) ⇒ Object
POST api.jpush.cn/v3/push/validate 验证推送调用是否能够成功,与推送 API 的区别在于:不向用户发送任何消息.
Methods included from Helper::ArgumentHelper
build_alias, build_extras, build_msg_ids, build_platform, build_registration_ids, build_tags, extended
Methods included from Helper::Argument
#check_alias, #check_mobile, #check_platform, #check_registration_id, #check_tag, #ensure_argument_not_blank, #ensure_argument_required, #ensure_not_over_bytesize, #ensure_not_over_size, #ensure_word_valid
Instance Method Details
#push(push_payload) ⇒ Object
POST api.jpush.cn/v3/push 向某单个设备或者某设备列表推送一条通知、或者消息
19 20 21 |
# File 'lib/jpush/push.rb', line 19 def push(push_payload) send_push(base_url, push_payload) end |
#validate(push_payload) ⇒ Object
POST api.jpush.cn/v3/push/validate 验证推送调用是否能够成功,与推送 API 的区别在于:不向用户发送任何消息
12 13 14 15 |
# File 'lib/jpush/push.rb', line 12 def validate(push_payload) url = base_url + 'validate' send_push(url, push_payload) end |