I'm interested if there is a way to get LeaderboardDataResponse object (and other response objects) as raw JSON data object or AS3 object?
OR if there is a easy way to convert it to the AS3 Object?
I have Facebook Graph API experience and for me it looks like it's much easier for developer to have JSON object as response. It's easier to loop through, trace object contents and etc.
I am new to GS and maybe I'm missing something.
Regards!
Best Answer
C
Customer Support
said
over 5 years ago
Hi Irakli
To get the data from a LeaderboardDataResponse object in AS3 you can use
.send(function(response:com.gamesparks.api.responses.LeaderboardDataResponse):void { var challengeInstanceId:String = response.getChallengeInstanceId(); var data:Vector.<LeaderboardData> = response.getData(); var first:Vector.<LeaderboardData> = response.getFirst(); var last:Vector.<LeaderboardData> = response.getLast(); var leaderboardShortCode:String = response.getLeaderboardShortCode(); var scriptData:ScriptData = response.getScriptData(); });
To get the data from a LeaderboardDataResponse object in AS3 you can use
.send(function(response:com.gamesparks.api.responses.LeaderboardDataResponse):void { var challengeInstanceId:String = response.getChallengeInstanceId(); var data:Vector.<LeaderboardData> = response.getData(); var first:Vector.<LeaderboardData> = response.getFirst(); var last:Vector.<LeaderboardData> = response.getLast(); var leaderboardShortCode:String = response.getLeaderboardShortCode(); var scriptData:ScriptData = response.getScriptData(); });
Irakli Geleishvili
Hello,
I'm interested if there is a way to get LeaderboardDataResponse object (and other response objects) as raw JSON data object or AS3 object?
OR if there is a easy way to convert it to the AS3 Object?
I have Facebook Graph API experience and for me it looks like it's much easier for developer to have JSON object as response. It's easier to loop through, trace object contents and etc.
I am new to GS and maybe I'm missing something.
Regards!
Hi Irakli
To get the data from a LeaderboardDataResponse object in AS3 you can use
.send(function(response:com.gamesparks.api.responses.LeaderboardDataResponse):void {
var challengeInstanceId:String = response.getChallengeInstanceId();
var data:Vector.<LeaderboardData> = response.getData();
var first:Vector.<LeaderboardData> = response.getFirst();
var last:Vector.<LeaderboardData> = response.getLast();
var leaderboardShortCode:String = response.getLeaderboardShortCode();
var scriptData:ScriptData = response.getScriptData();
});
Have a look at the documentation for this here
Thanks
Katie
Customer Support
Hi Irakli
To get the data from a LeaderboardDataResponse object in AS3 you can use
.send(function(response:com.gamesparks.api.responses.LeaderboardDataResponse):void {
var challengeInstanceId:String = response.getChallengeInstanceId();
var data:Vector.<LeaderboardData> = response.getData();
var first:Vector.<LeaderboardData> = response.getFirst();
var last:Vector.<LeaderboardData> = response.getLast();
var leaderboardShortCode:String = response.getLeaderboardShortCode();
var scriptData:ScriptData = response.getScriptData();
});
Have a look at the documentation for this here
Thanks
Katie
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2485 topics