Namespace: events

events

Push Notifications Events

Methods

staticQB.pushnotifications.events.create(params, callback)

modules/qbPushNotifications.js, line 145
Create notification event. This request will immediately produce notification delivery (push notification or email) (read more).
Name Type Description
params object Object of parameters.
Name Type Description
notification_type string Type of notification. Allowed values: push or email.
environment string An environment of the notification. Allowed values: development or production.
message string A payload of event. For push notifications: if event[push_type] not present - should be Base64 encoded text.
push_type string optional Push Notification type. Used only if event[notification_type] = push, ignored in other cases. If not present - Notification will be delivered to all possible devices for specified users. Each platform has their own standard format. If specified - Notification will be delivered to the specified platform only. Allowed values: apns, apns_voip, gcm, mpns or bbps.
event_type string optional Allowed values: one_shot, fixed_date or period_date. one_shot - a one-time event, which causes by an external object (the value is only valid if the 'date' is not specified). fixed_date - a one-time event, which occurs at a specified 'date' (the value is valid only if the 'date' is given). period_date - reusable event that occurs within a given 'period' from the initial 'date' (the value is only valid if the 'period' specified). By default: fixed_date, if 'date' is specified. period_date, if 'period' is specified. one_shot, if 'date' is not specified.
name string optional The name of the event. Service information. Only for your own usage.
period number optional The period of the event in seconds. Required if the event[event_type] = period_date. Possible values: 86400 (1 day). 604800 (1 week). 2592000 (1 month). 31557600 (1 year).
date number optional The date of the event to send on. Required if event[event_type] = fixed_date or period_date. If event[event_type] = fixed_date, the date can not be in the pas.
user object optional User's object of parameters.
Name Type Description
ids Array.<number> optional Notification's recipients - should contain a string of users' ids divided by commas.
tags object optional User's object of tags.
Name Type Description
any Array.<string> optional Notification's recipients - should contain a string of tags divided by commas. Recipients (users) must have at least one tag that specified in the list.
all Array.<string> optional Notification's recipients - should contain a string of tags divided by commas. Recipients (users) must exactly have only all tags that specified in list.
exclude Array.<string> optional Notification's recipients - should contain a string of tags divided by commas. Recipients (users) mustn't have tags that specified in list.
external_user object optional External user's object of parameters.
Name Type Description
ids Array.<number> optional Notification's recipients - should contain a string of tags divided by commas. Recipients (users) mustn't have tags that specified in list.
callback createPushEventCallback The createPushEventCallback function.

staticQB.pushnotifications.events.delete(id, callback)

modules/qbPushNotifications.js, line 208
Delete an event by ID.
Name Type Description
id number An id of event to delete.
callback deletePushEventByIdCallback The deletePushEventByIdCallback function.

staticQB.pushnotifications.events.get(id, callback)

modules/qbPushNotifications.js, line 192
Retrieve an event by ID.
Name Type Description
id number An id of event to retrieve.
callback getPushEventByIdCallback The getPushEventByIdCallback function.

staticQB.pushnotifications.events.list(params, callback)

modules/qbPushNotifications.js, line 171
Get list of events which were created by current user.
Name Type Description
params object Object of parameters.
Name Type Default Description
page number 1 optional Used to paginate the results when more than one page of events retrieved.
per_page number 10 optional The maximum number of events to return per page, if not specified then the default is 10.
callback listPushEventsCallback The listOfFilesCallback function.

staticQB.pushnotifications.events.status(id, callback)

modules/qbPushNotifications.js, line 224
Retrieve an event's status by ID
Name Type Description
id number An id of event to retrieve its status.
callback getPushEventStatusByIdCallback The getPushEventStatusByIdCallback function.