PlayerIO

The fastest way to build online games without breaking a sweat.

ActionScript3 Reference

actionscript 3 Notifications class informationClass Notifications

Namespace: playerio
Language: ActionScript 3

The Player.IO Notifications service

Properties

 
public
myNotifications :Array [read-only]

The list of notification endpoints registered for the current client.

Methods

 
public
deleteEndpoints (endpoints:Array, callback:Function, errorCallback:Function):void

Deletes the given endpoints

public
refresh (callback:Function, errorCallback:Function):void

Refreshes myEndpoints

public
registerEndpoints (endpointType:String, identifier:String, configuration:Object, enabled:Boolean, callback:Function, errorCallback:Function):void

Register a device or endpoint with Player.IO.

public
send (notifications:Array, callback:Function, errorCallback:Function):void

Send one or notifications

public
toggleEndpoints (endpoints:Array, enable:Boolean, callback:Function, errorCallback:Function):void

Enables or disabled the given endpoints.

Notifications.myNotifications

public
myNotifications :Array [read-only]

The list of notification endpoints registered for the current client.

Notifications.deleteEndpoints

public
deleteEndpoints (endpoints:Array, callback:Function, errorCallback:Function):void

Deletes the given endpoints

Arguments

endpoints:Array
The endpoints to delete.
callback:Function
Callback that is invoked when operation succeeds
errorCallback:Function
Callback that is invoked when operation fails

Notifications.refresh

public
refresh (callback:Function, errorCallback:Function):void

Refreshes myEndpoints

Arguments

callback:Function
Callback that will be called whn the refresh is complete.
errorCallback:Function
Callback that will be called if an error occurs.

Notifications.registerEndpoints

public
registerEndpoints (endpointType:String, identifier:String, configuration:Object, enabled:Boolean, callback:Function, errorCallback:Function):void

Register a device or endpoint with Player.IO.

Arguments

endpointType:String
Endpoint type, such as, IOS, Android, email, etc.
identifier:String
The identifier of the endpoint, such as the device token on iOS or an email address for email.
configuration:Object
Configuration relating to the endpoint. Can be null.
enabled:Boolean
Should the endpoint be enabled.
callback:Function
Callback that is invoked when operation succeeds
errorCallback:Function
Callback that is invoked when operation fails

Notifications.send

public
send (notifications:Array, callback:Function, errorCallback:Function):void

Send one or notifications

Arguments

notifications:Array
The notifications to send
callback:Function
Callback that is invoked when operation succeeds
errorCallback:Function
Callback that is invoked when the operation fails

Notifications.toggleEndpoints

public
toggleEndpoints (endpoints:Array, enable:Boolean, callback:Function, errorCallback:Function):void

Enables or disabled the given endpoints.

Arguments

endpoints:Array
The endpoints to enable or disable
enable:Boolean
If true, all the given endpoints will be enabled. If false, they'll be disabled.
callback:Function
Callback that is invoked when operation succeeds
errorCallback:Function
Callback that is invoked when operation fails