GetDivisionInfo
Essentially the same as GetTournamentStatus
, but takes a division set id instead of a leaderboardId as its parameter.
Provides information about the division - schedule, entry fees, prizes - as well as the player's enrollment status.
Service | Operation |
---|---|
tournament | GET_DIVISION_INFO |
Method Parameters
Parameter | Description |
---|---|
divSetId | Division set id |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string divSetId = "exampleDivSetId";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.TournamentService.GetDivisionInfo(divSetId, successCallback, failureCallback);
const char *divSetId = "exampleDivSetId";
_bc->getTournamentService()->getDivisionInfo(divSetId, this);
NSString *divSetId = @"exampleDivSetId";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc tournamentService] getDivisionInfo:divSetId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String divSetId = "exampleDivSetId";
this; // implements IServerCallback
_bc.getTournamentService().getDivisionInfo(divSetId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var divSetId = "exampleDivSetId";
_bc.tournament.getDivisionInfo(divSetId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var divSetId = "exampleDivSetId";
ServerResponse result = await _bc.tournamentService.getDivisionInfo(divSetId:divSetId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var divSetId = "exampleDivSetId";
var tournamentProxy = bridge.getTournamentServiceProxy();
var postResult = tournamentProxy.getDivisionInfo(divSetId);
if (postResult.status == 200) {
// Success!
}
{
"service": "tournament",
"operation": "GET_DIVISION_INFO",
"data": {
"divSetId": "exampleDivSetId"
}
}
JSON Response
{
"data": {
"server_time": 1537496450261,
"versionId": 1,
"tournamentTimetable": {
"tRegistrationStart": 1537496450261,
"tState": "ACTIVE",
"tPlayEnd": 1538072460000,
"tRegistrationEnd": 1538072460000,
"tPlayStart": 1537496450261
},
"tournamentConfigs": [
{
"tournamentCode": "free",
"description": {
"name": {
"en": "Free Tournament"
},
"desc": {
"en": "Basic free-to-enter tournament"
}
},
"customJson": {},
"payoutRules": [
{
"reward": {
"experiencePoints": 100,
"currency": {
"coin": 1000
}
},
"rank": {
"rankAbs": 1
}
},
{
"reward": {
"experiencePoints": 50,
"currency": {
"coin": 500
}
},
"rank": {
"rankAbs": 2
}
},
{
"reward": {
"experiencePoints": 25,
"currency": {
"coin": 250
}
},
"rank": {
"rankAbs": 3
}
},
{
"reward": {
"experiencePoints": 5,
"currency": {
"coin": 50
}
},
"rank": {
"rankToPercent": 50
}
}
],
"entryFee": {}
}
],
"enrolled": false
},
"status": 200
}