SendEvent
This service allows you to send events to specified players.
Results
Name | Description |
---|---|
response | Includes evId of sent event |
Service | Operation |
---|---|
event | SEND |
Method Parameters
Parameter | Description |
---|---|
toId | Profile Id of user to send event to. |
eventType | User-defined event type (optional.) |
eventData | User defined event data encoded in JSON. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var toId = "player1";
var eventType = "type1";
var eventData = {
"someMapAttribute": "someValue"
};
var eventProxy = bridge.getEventServiceProxy();
var postResult = eventProxy.sendEvent(toId, eventType, eventData);
if (postResult.status == 200) {
// Success!
}
{
"service": "event",
"operation": "SEND",
"data": {
"toId": "player1",
"eventType": "type1",
"eventData": {
"someMapAttribute": "someValue"
}
}
}
JSON Response
{
"packetId": 1,
"messageResponses": [
{
"status": 200,
"data": {
"response": {
"evId": "9789273589757"
}
}
}
]
}