SysExtendPxExpiry
tip
This method is available in Cloud Code scripts only.
Extends the px expiry of profileId
by the specified amount of seconds
. If no time limit is given, the value of brainCloud property presPxExpirySecs
will be used.
If seconds is greater than brainCloud property presPxExpiryExtSecMax
, then it will just extend by presPxExpiryExtSecMax
.
Service | Operation |
---|---|
presence | SYS_EXTEND_PX_EXPIRY |
Method Parameters
Parameter | Description |
---|---|
profileId | Target profile ID. |
seconds | Number of seconds to extend px expiry |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var presenceProxy = bridge.getPresenceServiceProxy();
var profileId = "aaa-bbb-ccc-ddd";
var seconds = 300;
var postResult = presenceProxy.sysExtendPxExpiry(profileId, seconds);
if (postResult.status == 200) {
// Success!
}
{
"service": "presence",
"operation": "SYS_EXTEND_PX_EXPIRY",
"data": {
"profileId": "aaa-bbb-ccc-ddd",
"seconds": 25
}
}
JSON Response
{
"data": null,
"status": 200
}