The Game service allows Game, User, Score and Scoreboard Management on the Cloud. The service allows Game Developer to create a game and then maintain the game scoring using the Score service. It also allows to maintain a Scoreboard across game sessions using the ScoreBoard service. One can query for average or highest score for user for a Game and highest and average score across users for a Game. It also records and provides ranking of the user against other users for a particular game. The Reward and Reward Points allow the Game Developer to assign rewards to a user and redeem the rewards. For instance, one can give Swords or Energy etc. The services- Game, Score, ScoreBoard, Reward, and Reward Points can be used in Conjunction for complete Game Scoring and Reward Management.

Initialize

In order to use various functions available in a specific API, a developer has to create an instance of ServiceAPI by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.

Required Parameters

apiKey - The Application key given when the application was created. secretKey - The secret key corresponding to the application key given when the application was created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI *api = [[ServiceAPI alloc]init];
api.apiKey = @"<API_KEY>";
api.secretKey = @"<SECRET_KEY>"; 
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
App42.initialize("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
$api = new ServiceAPI("API_KEY","SECRET_KEY"); 
GameService::Initialize("API_KEY","SECRET_KEY");
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>")   
var api:ServiceAPI = new ServiceAPI("API_KEY","SECRET_KEY");
Coming Soon

Build Service

After initialization, developer needs to call the buildXXXService method on ServiceAPI instance to get the instance of the particular API that you wish to build. For example, To build an instance of GameService, buildGameService() method needs to be called.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
GameService gameService = api.buildGameService(); 
ScoreBoardService scoreBoardService = api.buildScoreBoardService(); 
ScoreService scoreService = api.buildScoreService(); 
RewardService rewardService = api.buildRewardService(); 
GameService gameService = api.BuildGameService(); 
ScoreBoardService scoreBoardService = api.buildScoreBoardService(); 
ScoreService scoreService = api.buildScoreService(); 
RewardService rewardService = api.buildRewardService();  
GameService *gameService = [api buildGameService]; 
ScoreBoardService *scoreBoardService = [api buildScoreBoardService]; 
ScoreService *scoreService = [api buildScoreService]; 
RewardService *rewardService = [api buildRewardService]; 
GameService gameService = api.buildGameService(); 
ScoreBoardService scoreBoardService = api.buildScoreBoardService(); 
ScoreService scoreService = api.buildScoreService(); 
RewardService rewardService = api.buildRewardService(); 
GameService gameService = api.buildGameService(); 
ScoreBoardService scoreBoardService = api.buildScoreBoardService(); 
ScoreService scoreService = api.buildScoreService(); 
RewardService rewardService = api.buildRewardService(); 
GameService gameService = api.BuildGameService(); 
ScoreBoardService scoreBoardService = api.buildScoreBoardService(); 
ScoreService scoreService = api.buildScoreService(); 
RewardService rewardService = api.buildRewardService();
var gameService  = new App42Game();
var scoreBoardService  = new App42ScoreBoard();
var scoreService  = new App42Score();
var rewardService  = new App42Reward();
GameService gameService = api.BuildGameService(); 
ScoreBoardService scoreBoardService = api.buildScoreBoardService(); 
ScoreService scoreService = api.buildScoreService(); 
RewardService rewardService = api.buildRewardService(); 
$gameService = $api->buildGameService(); 
$scoreBoardService = $api->buildScoreBoardService(); 
$scoreService = $api->buildScoreService(); 
$rewardService = $api->buildRewardService(); 
GameService* gameService = GameService::getInstance();
ScoreBoardService* scoreBoardService = ScoreBoardService::getInstance();
ScoreService* scoreService = ScoreService::getInstance();
RewardService* rewardService = RewardService::getInstance();
game_service = api.build_game_service  
score_board_service = api.build_score_board_service  
score_service = api.build_score_service  
reward_service = api.build_reward_service 
var gameService:GameService = api.buildGameService(); 
var scoreBoardService:ScoreBoardService = api.buildScoreBoardService(); 
var scoreService:ScoreService = api.buildScoreService(); 
var rewardService:RewardService = api.buildRewardService(); 
Coming Soon

Import Statement

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
import com.shephertz.app42.paas.sdk.android.App42BadParameterException;
import com.shephertz.app42.paas.sdk.android.App42Exception;
import com.shephertz.app42.paas.sdk.android.App42NotFoundException;
import com.shephertz.app42.paas.sdk.android.App42Response;
import com.shephertz.app42.paas.sdk.android.ServiceAPI;
import com.shephertz.app42.paas.sdk.android.game.Game;
import com.shephertz.app42.paas.sdk.android.game.GameService;
import com.shephertz.app42.paas.sdk.android.game.Reward;
import com.shephertz.app42.paas.sdk.android.game.RewardService;
import com.shephertz.app42.paas.sdk.android.game.ScoreBoardService;
import com.shephertz.app42.paas.sdk.android.game.ScoreService;
using com.shephertz.app42.paas.sdk.windows;  
using com.shephertz.app42.paas.sdk.windows.game;   
#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
import com.shephertz.app42.paas.sdk.jme.App42BadParameterException;
import com.shephertz.app42.paas.sdk.jme.App42Exception;
import com.shephertz.app42.paas.sdk.jme.App42NotFoundException;
import com.shephertz.app42.paas.sdk.jme.App42Response;
import com.shephertz.app42.paas.sdk.jme.ServiceAPI;
import com.shephertz.app42.paas.sdk.jme.game.Game;
import com.shephertz.app42.paas.sdk.jme.game.GameService;
import com.shephertz.app42.paas.sdk.jme.game.Reward;
import com.shephertz.app42.paas.sdk.jme.game.RewardService;
import com.shephertz.app42.paas.sdk.jme.game.ScoreBoardService;
import com.shephertz.app42.paas.sdk.jme.game.ScoreService;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42NotFoundException;
import com.shephertz.app42.paas.sdk.java.App42Response;
import com.shephertz.app42.paas.sdk.java.ServiceAPI;
import com.shephertz.app42.paas.sdk.java.game.Game;
import com.shephertz.app42.paas.sdk.java.game.GameService;
import com.shephertz.app42.paas.sdk.java.game.Reward;
import com.shephertz.app42.paas.sdk.java.game.RewardService;
import com.shephertz.app42.paas.sdk.java.game.ScoreBoardService;
import com.shephertz.app42.paas.sdk.java.game.ScoreService;
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.game; 
<script type="text/javascript" src="App42-all-x.x.x.min.js">&lt;/script>
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.game;  
use com\shephertz\app42\paas\sdk\php\App42Exception;  
use com\shephertz\app42\paas\sdk\php\App42Response; 
use com\shephertz\app42\paas\sdk\php\App42NotFoundException;  
use com\shephertz\app42\paas\sdk\php\App42BadParameterException;
use com\shephertz\app42\paas\sdk\php\game\GameService;  
use com\shephertz\app42\paas\sdk\php\game\RewardService;  
use com\shephertz\app42\paas\sdk\php\game\ScoreBoardService;   
use com\shephertz\app42\paas\sdk\php\game\ScoreService;  
use com\shephertz\app42\paas\sdk\php\ServiceAPI;  
include_once '../GameService.php';  
include_once '../RewardService.php';    
include_once '../ScoreBoardService.php';  
include_once '../ScoreService.php';   
include_once '../ServiceAPI.php';  
#include "Game/GameService.h"
#include "Game/RewardService.h"
#include "Game/ScoreBoardService.h"
#include "Game/ScoreService.h"
#include "Game/App42RewardResult.h"
#include "Game/App42GameResult.h"
require 'App42_Ruby_API'
import com.shephertz.app42.paas.sdk.as3.App42BadParameterException;
import com.shephertz.app42.paas.sdk.as3.App42Exception;
import com.shephertz.app42.paas.sdk.as3.App42NotFoundException;
import com.shephertz.app42.paas.sdk.as3.App42Response;
import com.shephertz.app42.paas.sdk.as3.ServiceAPI;
import com.shephertz.app42.paas.sdk.as3.game.Game;
import com.shephertz.app42.paas.sdk.as3.game.GameService;
import com.shephertz.app42.paas.sdk.as3.game.Reward;
import com.shephertz.app42.paas.sdk.as3.game.RewardService;
import com.shephertz.app42.paas.sdk.as3.game.ScoreBoardService;
import com.shephertz.app42.paas.sdk.as3.game.ScoreService;
    Coming Soon

Create Game

Creates game on the cloud.

Required Parameters

gameName - The game that has to be created. description - Description of the game to be created

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String description = "description";
Game game = gameService.createGame(gameName,description); 
System.out.println("gameName is " + game.getName());
System.out.println("gameDescription is " + game.getDescription());
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String description = "description";
gameService.CreateGame(gameName,description,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		Console.WriteLine("gameDescription is " + game.GetDescription()); 
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *description = @"description";
Game *game = [gameService createGame:gameName description:description]; 
NSLog(@"gameName is = %@" game.gameName);
NSLog(@"gameDescription is = %@",game.description);
String gameName = "<Enter_your_game_name>";
String description = "description";
Game game = gameService.createGame(gameName,description); 
System.out.println("gameName is " + game.getName());
System.out.println("gameDescription is " + game.getDescription());
String gameName = "<Enter_your_game_name>";
String description = "description";
Game game = gameService.createGame(gameName,description); 
System.out.println("gameName is " + game.getName());
System.out.println("gameDescription is " + game.getDescription());
String gameName = "<Enter_your_game_name>";
String description = "description";
gameService.CreateGame(gameName, description, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		App42Log.Console("gameDescription is " + game.GetDescription()); 
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
description = "description",	
result ;  
gameService.createGame(gameName,description,{  
	success: function(object) {  
	var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is " + result.gameName)
		console.log("gameDescription is " + result.description)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String description = "description";
Game game = gameService.CreateGame(gameName,description); 
Console.WriteLine("gameName is " + game.GetName()); 
Console.WriteLine("gameDescription is " + game.GetDescription()); 
$gameName = "<Enter_your_game_name>";		
$description = "description";				
$game = $gameService->createGame($gameName,$description);
print_r("gameName is " . $game->getName());
print_r("gameDescription is " . $game->getDescription());
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
std::string gameName = "<Enter_your_game_name>";
std::string description = "description";
gameService->CreateGame(gameName,description,authGameCallback);
GameService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
game_name = "<Enter_your_game_name>";
description = "description";
game = game_service.create_game(game_name,description); 
puts "gameName is #{game.name}";
puts "gameDescription is #{game.description}";                            
var gameName:String = "<Enter_your_game_name>";
var description:String = "description";
gameService.createGame(gameName,description, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game.getName());
		trace("response is : " + game.getDescription());
	}  
}  
Coming Soon 

Get All Games

Fetches all games for the App.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
ArrayList<Game> game = gameService.getAllGames(); 
for(int i=0;i<game.size();i++)
{
	System.out.println("gameName is " + game.get(i).getName());
	System.out.println("description is " + game.get(i).getDescription());
}   
public class Callback : App42Callback  
{  
gameService.GetAllGames(this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : " + exception);  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		IList<Game> game = (List<Game>) response; 
		for (int i = 0; i < game.Count; i++) 
		{
			Console.WriteLine("gameName is " + game[i].GetName());
			Console.WriteLine("gameDescription is " + game[i].GetDescription());
		}      
	}  
}  
NSArray *gameList = [gameService getAllGames];  
for(Game *game in gameList)
{
	NSLog(@"Game Name is = %@",game.name);
	NSLog(@"Game Description is = %@",game.description); 
}
Vector gameList = gameService.getAllGames(); 
for(int i=0;i< gameList.size();i++)
{
    Game game = (Game) gameList.elementAt(i);
	System.out.println("gameName is " + game.getName());
	System.out.println("gameDescription is " + game.getDescription());
}
ArrayList<Game> game = gameService.getAllGames(); 
for(int i=0;i<game.size();i++)
{
	System.out.println("gameName is " + game.get(i).getName());
	System.out.println("description is " + game.get(i).getDescription());
}   
gameService.GetAllGames(new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		IList<Game> game = (List<Game>) response; 
		for (int i = 0; i < game.Count; i++) 
		{
			App42Log.Console("gameName is " + game[i].GetName());
			App42Log.Console("gameDescription is " + game[i].GetDescription());
		}     
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var result ;  
gameService.getAllGames({  
success: function(object) {  
var game = JSON.parse(object);  
result = game.app42.response.games.game;
console.log("result is " + result)
},  
error: function(error) {  
}  
});     
IList<Game> game = gameService.GetAllGames(); 
for (int i = 0; i < game.Count; i++) 
{
	Console.WriteLine("gameName is " + game[i].GetName());
	Console.WriteLine("gameDescription is " + game[i].GetDescription());
}      
$gameList = $gameService->getAllGames(); 
foreach( $gameList as $game )
{
	print_r("gameName is" . $game->getName()); 
	print_r("gameDescription is" . $game->getGameDescription()); 
}
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
gameService->GetAllGames(authGameCallback);
GameService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
game_list = Array.new();
game = game_service.get_all_games();
for game in game_list do
  puts "gameName is #{game.name}";
  puts "gameDescription is #{game.description}";
end
json_response = game_list.to_s();
gameService.getAllGames(new callback());  
public class callback implements App42CallBack  
{  
public function onException(excption:App42Exception):void  
{  
	trace("Exception : " + excption);  
}  
public function onSuccess(response:Object):void  
{  
	if(response is Array)
	{
		for(var i:int = 0;i < response.length;i++)
		{
			var game:Game = Game(response[i]);
			trace("gameName is " + game.getName());
			trace("description  : " + game.getDescription());
		}	
	}
}  
}  
Coming Soon

Get All Games Count

Gets the count of all the users.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
App42Response response = gameService.getAllGamesCount(); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
public class Callback : App42Callback  
{  
gameService.GetAllGamesCount(this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception : "+ exception);  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		App42Response response = (App42Response) response;     
		String jsonResponse = response.ToString();  
	}  
}  
App42Response *response = [gameService getAllGamesCount]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
App42Response response = gameService.getAllGamesCount(); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
App42Response response = gameService.getAllGamesCount(); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
gameService.GetAllGamesCount(new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		App42Response response = (App42Response) response;     
		String jsonResponse = response.ToString();  
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var result ;  
gameService.getAllGamesCount({  
success: function(object) {  
var game = JSON.parse(object);  
result = game.app42.response;
console.log("totalRecord is " + result.totalRecords)
},  
error: function(error) {  
}  
});     
App42Response response = gameService.GetAllGamesCount(); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$response = $gameService->getAllGamesCount(); 
$success = $respons->isResponseSuccess();
$jsonResponse = $respons->toString(); 
Coming Soon
response = game_service.get_all_games_count();
success = response.is_response_success();
total_records = response.total_records();
json_response = response.to_s();
gameService.getAllGamesCount(new callback() );  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(obj:Object):void  
	{  
		var response:App42Response = App42Response(obj);  
		trace("response is : " + response);
	}  
}  
Coming Soon 

Get All Games With Paging

Fetches all games for the App by Paging.

Required Parameters

max - Maximum number of records to be fetched. offset - From where the records are to be fetched

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
int max = 10;
int offset = 0 ;
ArrayList<Game> game = gameService.getAllGames(max,offset); 
for(int i=0;i<game.size();i++)
{
	System.out.println("gameName is " + game.get(i).getName());
	System.out.println("description is " + game.get(i).getDescription());
}   
public class Callback : App42Callback  
{  
int max = 10;
int offset = 0 ;
gameService.GetAllGames(max,offset,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		IList<Game> game = (List<Game>) response; 
		for (int i = 0; i < game.Count; i++) 
		{
			Console.WriteLine("gameName is " + game[i].GetName());
			Console.WriteLine("gameDescription is " + game[i].GetDescription());
		}          
	}  
}  
int max = 10;
int offset = 0 ;
NSArray *gameList = [gameService getAllGames:max offset:offset]; 
for(Game *game in gameList)
{
	NSLog(@"Game Name is = %@",game.name);
	NSLog(@"Game Description is = %@",game.description); 
}
Integer max = new Integer(1);
Integer offset = new Integer(0);
Vector gameList = gameService.getAllGames(max,offset); 
for(int i=0;i< gameList.size();i++)
{
    Game game = (Game) gameList.elementAt(i);
	System.out.println("gameName is " + game.getName());
	System.out.println("gameDescription is " + game.getDescription());
} 
int max = 10;
int offset = 0 ;
ArrayList<Game> game = gameService.getAllGames(max,offset);
for(int i=0;i<game.size();i++)
{
	System.out.println("gameName is " + game.get(i).getName());
	System.out.println("description is " + game.get(i).getDescription());
}   
int max = 10;
int offset = 0 ;
gameService.GetAllGames(max, offset, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		IList<Game> game = (List<Game>) response; 
		for (int i = 0; i < game.Count; i++) 
		{
			App42Log.Console("gameName is " + game[i].GetName());
			App42Log.Console("gameDescription is " + game[i].GetDescription());
		}  
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var max = 10,
offset = 0 ,
result ;  
gameService.getAllGamesWithPaging(max,offset,{  
success: function(object) {  
var game = JSON.parse(object);  
result = game.app42.response.games.game;
console.log("result is " + result)
},  
error: function(error) {  
}  
});     
int max = 10;
int offset = 0 ;
IList<Game> game = gameService.GetAllGames(max,offset); 
for (int i = 0; i < game.Count; i++) 
{
	Console.WriteLine("gameName is " + game[i].GetName());
	Console.WriteLine("gameDescription is " + game[i].GetDescription());
}  
$max = 10;
$offset = 0 ;
$gameList = $gameService->getAllGames($max,$offset);
foreach($gameList as $game){
print_r("gameName is" . $game->getName()); 
print_r("gameDescription is" . $game->getGameDescription());  
}
Coming Soon
max = 10;
offset = 0;						
game_list = Array.new();
game= game_service.get_all_games_by_paging(max,offset);
for game in game_list do
  puts "gameName is #{game.name}";
  puts "gameDescription is #{game.description}";
end
json_response = game_list.to_s();
var max:int = 1;
var offset:int = 0;			
gameService.getAllGames(max,offset, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		if(response is Array)
		{
			for(var i:int = 0;i < response.length;i++)
			{
				var game:Game = Game(response[i]);
				trace("gameName is " + game.getName());
				trace("description  : " + game.getDescription());
			}	
		}
	}  
}  
Coming Soon

Get Game By Name

Fetch the game by the specified name.

Required Parameters

gameName - Name of the game that has to be fetched

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
Game game = gameService.getGameByName(gameName); 
System.out.println("gameName is " + game.getName());
System.out.println("gameDescription is " + game.getDescription());
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
gameService.GetGameByName(gameName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		Console.WriteLine("gameDescription is " + game.GetDescription()); 
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
Game *game = [gameService getGameByName:gameName]; 
NSLog(@"gameName is = %@" game.gameName);
NSLog(@"gameDescription is = %@",game.description);
String gameName = "<Enter_your_game_name>";
Game game = gameService.getGameByName(gameName); 
System.out.println("gameName is " + game.getName());
System.out.println("gameDescription is " + game.getDescription());
String gameName = "<Enter_your_game_name>";
Game game = gameService.getGameByName(gameName); 
System.out.println("gameName is " + game.getName());
System.out.println("gameDescription is " + game.getDescription());
String gameName = "<Enter_your_game_name>";
gameService.GetGameByName(gameName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		App42Log.Console("gameDescription is " + game.GetDescription()); 
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
result ;  
gameService.getGameByName(gameName,{  
	success: function(object) {  
	var game = JSON.parse(object);  
	result = game.app42.response.games.game;
		console.log("gameName is " + result.gameName)
		console.log("gameDescription is " + result.description)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
Game game = gameService.GetGameByName(gameName); 
Console.WriteLine("gameName is " + game.GetName()); 
Console.WriteLine("gameDescription is " + game.GetDescription()); 
$gameName = "<Enter_your_game_name>";
$game = $gameService->getGameByName($gameName);
print_r("gameName is " . $game->getName());
print_r("gameDescription is " . $game->getDescription());
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
std::string gameName = "<Enter_your_game_name>";
gameService->GetGameByName(gameName,authGameCallback);
GameService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
game_name = "<Enter_your_game_name>";						
game = game_service.get_game_by_name(game_name); 
puts "gameName is #{game.name}";
puts "gameDescription is #{game.description}";
var gameName:String = "<Enter_your_game_name>";	
gameService.getGameByName(gameName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("gameName is " + game.getName());
		trace("gameDescription is " + game.getDescription());
	}  
}  
Coming Soon 

Save User Score

Saves the User score for a game.

Required Parameters

gameName - Name of the game for which score has to be saved. userName - The user for which score has to be saved gameScore - The sore that has to be saved

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreBoardService.saveUserScore(gameName,userName,gameScore);
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
scoreBoardService.SaveUserScore(gameName,userName,gameScore,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message" + exception);  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
double gameScore = 3500;
Game *game = [scoreBoardService saveUserScore:gameName gameUserName:userName gameScore:gameScore]; 
NSLog(@"gameName is = %@" game.name);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
Game game = scoreBoardService.saveUserScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreBoardService.saveUserScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}

String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
scoreBoardService.SaveUserScore(gameName, userName, gameScore, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
gameScore = 3500,
result ;  
scoreBoardService.saveUserScore(gameName,userName,gameScore,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
Game game = scoreBoardService.SaveUserScore(gameName,userName,gameScore); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
{
	Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
	Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
	Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$gameScore = 3500;
$game = $scoreBoardService->saveUserScore($gameName,$userName,$gameScore);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
std::string gameName = "<Enter_your_game_name>";
std::string userName = "userName";
std::double gameScore = 3500;
scoreBoardService->SaveUserScore(gameName,userName,gameScore,authGameCallback);
ScoreBoardService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
game_name = "<Enter_your_game_name>";
game_user_name = "Nick"; 
game_score = 400000;						
game = score_board_service.save_user_score(game_name, game_user_name, game_score);
puts "gameName is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.userName}";
  puts "value is #{score.value}";
end
json_response = game.to_s();
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";
var gameScore:int = 40000;		
scoreBoardService.saveUserScore(gameName,userName,gameScore, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception : " + excption);  
	}  
	public function onSuccess(response:Object):void  
	{  
		var scoreClass:Score = new Score();
		var game:Game   = Game(res);
		trace("gameName is : " + game.getName());
		trace("username is :  " + Score(gameResponse.getScoreList()[0]).getUserName());
		trace("value is : " + Score(gameResponse.getScoreList()[0]).getValue());
		trace("scoreId is :  " + Score(gameResponse.getScoreList()[0]).getScoreId());
	}  
}  
Coming Soon 

Get Scores By User

Fetcheds the scores for a game for the specified name.

Required Parameters

gameName - Name of the game for which score has to be fetched. userName - The user for which score has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getScoresByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetScoresByUser(gameName,userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
Game *game = [scoreBoardService getScoresByUser:gameName gameUserName:userName]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getScoresByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getScoresByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetScoresByUser(gameName, userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
result ;  
scoreBoardService.getScoresByUser(gameName,userName,{  
	success: function(object) 
	{ 
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.GetScoresByUser(gameName,userName); 
Console.WriteLine("gameName is " + game.GetName());
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$game = $scoreBoardService->getScoresByUser($gameName,$userName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
game_name = "<Enter_your_game_name>";
user_name = "Nick";						
game = score_board_service.get_scores_by_user(game_name, user_name);
puts "gameName is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end
json_response = game.to_s();
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";
scoreBoardService.getScoresByUser(gameName,userName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Highest Scores By User

Fetche the highest game score for the specified user.

Required Parameters

gameName - Name of the game for which score has to be fetched. userName - The user for which score has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getHighestScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetHighestScoreByUser(gameName,userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
		
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
Game *game = [scoreBoardService getHighestScoreByUser:gameName gameUserName:userName]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getHighestScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getHighestScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetHighestScoreByUser(gameName, userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
result ;  
scoreBoardService.getHighestScoreByUser(gameName,userName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.GetHighestScoreByUser(gameName,userName); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$game = $scoreBoardService->getHighestScoreByUser($gameName,$userName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
std::string gameName = "<Enter_your_game_name>";
std::string userName = "userName";
scoreBoardService->GetHighestScoreByUser(gameName,userName,authGameCallback);
ScoreBoardService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
game_name = "<Enter_your_game_name>";
user_name = "userName";						
game = score_board_service.get_highest_score_by_user(game_name, user_name); 
puts "gameName is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end
json_response = game.to_s();
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";
scoreBoardService.getHighestScoreByUser(gameName,userName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Lowest Scores By User

Fetche the highest game score for the specified user.

Required Parameters

gameName - Name of the game for which score has to be fetched. userName - The user for which score has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getLowestScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetLowestScoreByUser(gameName,userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
Game *game = [scoreBoardService getLowestScoreByUser:gameName gameUserName:userName getHighestScoreByUser:decription]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getLowestScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getLowestScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetLowestScoreByUser(gameName,userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
result ;  
scoreBoardService.getLowestScoreByUser(gameName,userName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.GetLowestScoreByUser(gameName,userName); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$game = $scoreBoardService->getLowestScoreByUser($gameName,$userName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
game_name = "<Enter_your_game_name>";
user_name = "Nick";					
game = score_board_service.get_lowest_score_by_user(gameName, userName);
puts "gameName is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end
json_response = game.to_s();
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";
scoreBoardService.getLowestScoreByUser(gameName,userName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Average Scores By User

Retrieves the average game score for the specified user.

Required Parameters

gameName - Name of the game for which highest score has to be fetched . userName - The user for which highest score has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getAverageScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetAverageScoreByUser(gameName,userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
Game *game = [scoreBoardService getAverageScoreByUser:gameName gameUserName:userName]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getAverageScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getAverageScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetAverageScoreByUser(gameName,userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
result ;  
scoreBoardService.getAverageScoreByUser(gameName,userName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.GetAverageScoreByUser(gameName,userName); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$game = $scoreBoardService->getAverageScoreByUser($gameName,$userName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
std::string gameName = "<Enter_your_game_name>";
std::string userName = "userName";
scoreBoardService->GetAverageScoreByUser(gameName,userName,authGameCallback);
ScoreBoardService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
game_name = "<Enter_your_game_name>";
user_name = "Nick";
game = score_board_service.get_average_score_by_user(game_name, user_name);
puts "gameName is #{game.get_name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end

 
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";
scoreBoardService.getAverageScoreByUser(gameName,userName, new callback()); 
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top Rankings

Retrieves the Top Rankings for the specified game.

Required Parameters

gameName - Name of the game for which ranks have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
Game game = scoreBoardService.getTopRankings(gameName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
scoreBoardService.GetTopRankings(gameName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
Game *game = [scoreBoardService getTopRankings:gameName]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
Game game = scoreBoardService.getTopRankings(gameName); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
Game game = scoreBoardService.getTopRankings(gameName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
scoreBoardService.GetTopRankings(gameName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
result ;  
scoreBoardService.getTopRankings(gameName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
Game game = scoreBoardService.GetTopRankings(gameName); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$game = $scoreBoardService->getTopRankings($gameName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
game_name = "<Enter_your_game_name>";
game = score_board_service.get_top_rankings(game_name); 
puts "gameName is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end
json_response = game.to_s();
var gameName:String = "<Enter_your_game_name>";	
scoreBoardService.getTopRankings(gameName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top Rankings By Date

Retrieves the Top Rankings for the specified game in date range.

Required Parameters

gameName - Name of the game for which ranks have to be fetched. startDate - Start date from which the ranking have to be fetched endDate - End date up to which the ranking have to be fetched

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
Date startDate = null; /* Get date from your source */
Date endDate = null; /* Get date from your source */
Game game = scoreBoardService.getTopRankings(gameName,startDate,endDate); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
DateTime startTime = null; /* Get date from your source */
DateTime endTime = null; /* Get date from your source */
scoreBoardService.GetTopRankings(gameName,startDate,endDate,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSDate *startDate =null; /* Get date from your source */
NSDate *endDate = null; /* Get date from your source */
Game *game = [scoreBoardService getTopRankings:gameName startDate:startDate endDate:endDate]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
Date startDate = null; /* Get date from your source */
Date endDate = null; /* Get date from your source */
Game game = scoreBoardService.getTopRankings(gameName,startDate,endDate); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
Date startDate = null; /* Get date from your source */
Date endDate = null; /* Get date from your source */
Game game = scoreBoardService.getTopRankings(gameName,startDate,endDate); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
DateTime startDate = null; /* Get date from your source */
DateTime endDate = null; /* Get date from your source */
scoreBoardService.GetTopRankings(gameName, startDate, endDate, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>";
var startDate = null; /* Get date from your source */
var endDate = null; /* Get date from your source */
var result ;  
scoreBoardService.getTopRankingsByDate(gameName,startDate,endDate,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
DateTime startDate = null; /* Get date from your source */
DateTime endDate = null; /* Get date from your source */
Game game = scoreBoardService.GetTopRankings(gameName,startDate,endDate); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$startDate = null; /* Get date from your source */
$endDate = null; /* Get date from your source */
$game = $scoreBoardService->getTopRankings($gameName,$startDate,$endDate);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
Coming Soon
 
var gameName:String = "<Enter_your_game_name>";	
var startDate:Date = null; /* Get date from your source */
var endDate:Date = null; /* Get date from your source */
scoreBoardService.getTopRankingsByDate(gameName,startDate,endDate, new callback());  
public class callback implements App42CallBack  
{ 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top Rankings By Group

Retrieves the Top Rankings for the specified game.

Required Parameters

gameName - Name of the game for which ranks have to be fetched. userList - List of user from which ranking has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
ArrayList<String> userList = new ArrayList<String>();
userList.add("Nick");
Game game = scoreBoardService.getTopRankingsByGroup(gameName,userList); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
IList<String> userList = new IList<String>();
userList.Add("Nick");
scoreBoardService.GetTopRankingsByGroup(gameName,userList,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSArray *userList = [[NSArray alloc]initWithObjects:@"Nick", nil];
Game *game = [scoreBoardService getTopRankingsByGroup:gameName userList:userList]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
Vector userList = new Vector();
userList.addElement("Nick");
Game game = scoreBoardService.getTopRankingsByGroup(gameName,userList); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
ArrayList<String> userList = new ArrayList<String>();
userList.add("Nick");
Game game = scoreBoardService.getTopRankingsByGroup(gameName,userList); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
IList<String> userList = new List<String>();
userList.Add("Nick");
scoreBoardService.GetTopRankingsByGroup(gameName, userList, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>";
var userList = new Array();
userList.push("Nick")
var result ;  
scoreBoardService.getTopRankingsByGroup(gameName,userList,{  
	success: function(object)
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
IList<String> userList = new List<String>();
userList.Add("Nick");
Game game = scoreBoardService.GetTopRankingsByGroup(gameName,userList); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$userList = array();
array_push($userList, "Nick");
$game = $scoreBoardService->getTopRankingsByGroup($gameName,$userList);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
Coming Soon
var gameName:String = "<Enter_your_game_name>";	
var startDate:Date = null; /* Get date from your source */
var endDate:Date = null; /* Get date from your source */
scoreBoardService.getTopRankingsByDate(gameName,startDate,endDate, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top N Rankings

Retrieves the Top N Rankings for the specified game.

Required Parameters

gameName - Name of the game for which ranks have to be fetched. max - Maximum number of records to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.getTopNRankings(gameName,max); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
	String gameName = "<Enter_your_game_name>";
	int max = 10;
	scoreBoardService.GetTopNRankings(gameName,max,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
int max = 10;
Game *game = [scoreBoardService getTopNRankings:gameName max:max]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.getTopNRankings(gameName,max); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.getTopNRankings(gameName,max); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
int max = 10;
scoreBoardService.GetTopNRankings(gameName,max, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
max = 10,
result ;  
scoreBoardService.getTopNRankings(gameName,max,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.GetTopNRankings(gameName,max); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$max = 10;
$game = $scoreBoardService->getTopNRankings($gameName,$max);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
game_name = "<Enter_your_game_name>";
max = 2;
game = score_board_service.get_top_n_rankings(game_name,max);
puts "Game Name is #{game.name}";
score_list = Array.new();
scoreList = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end

var gameName:String = "<Enter_your_game_name>";	
var max:int = 5;
scoreBoardService.getTopNRankings(gameName,max, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top N Rankers

This function returns the specified number of top rankers in a specific game.

Required Parameters

gameName - Name of the game for which ranks have to be fetched. max - Maximum number of records to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.getTopNRankers(gameName,max); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
int max = 10;
scoreBoardService.GetTopNRankers(gameName,max,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
int max = 10;
Game *game = [scoreBoardService getTopNRankers:gameName max:max]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.getTopNRankers(gameName,max); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.getTopNRankers(gameName,max); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
int max = 10;
scoreBoardService.GetTopNRankers(gameName, max, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
max = 10,
result ;  
scoreBoardService.getTopNRankers(gameName,max,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
int max = 10;
Game game = scoreBoardService.GetTopNRankers(gameName,max); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$max = 10;
$game = $scoreBoardService->getTopNRankers($gameName,$max);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
Coming Soon
var gameName:String = "<Enter_your_game_name>";	
var max:int = 5;
scoreBoardService.getTopNRankers(gameName,max, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top N Rankers By Date

Retrieves the Top Rankings for the specified game in date range.

Required Parameters

gameName - Name of the game for which ranks have to be fetched. startDate - Start date from which the ranking have to be fetched endDate - End date up to which the ranking have to be fetched max - Max rankers to get.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
Date startDate = null; /* Get date from your source */
Date endDate = null;
int max =1;
Game game = scoreBoardService.getTopNRankers(gameName,startDate,endDate,max); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
DateTime startTime = null;
DateTime endTime = null; 
int max = 10;
scoreBoardService.getTopNRankers(gameName,startDate,endDate,max,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
int max = 10;
NSString *gameName = @"<Enter_your_game_name>";
NSDate *startDate =null; /* Get date from your source */
NSDate *endDate = null; /* Get date from your source */
Game *game = [scoreBoardService getTopRankings:gameName startDate:startDate endDate:endDate max:max]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
Date startDate = null; /* Get date from your source */
Date endDate = null; /* Get date from your source */
Integer max = new Integer(1);
Game game = scoreBoardService.getTopNRankers(gameName,startDate,endDate,max); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
int max = 10;
String gameName = "<Enter_your_game_name>";
Date startDate = null; /* Get date from your source */
Date endDate = null; /* Get date from your source */
Game game = scoreBoardService.getTopNRankers(gameName,startDate,endDate,max); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
int max = 10;
String gameName = "<Enter_your_game_name>";
DateTime startDate = null; /* Get date from your source */
DateTime endDate = null; /* Get date from your source */
scoreBoardService.getTopNRankers(gameName, startDate, endDate, max, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var max =1;
var gameName = "<Enter_your_game_name>";
var startDate = null; /* Get date from your source */
var endDate = null; /* Get date from your source */
var result ;  
scoreBoardService.getTopNRankersByDate(gameName,startDate,endDate,max,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
int max = 10;
String gameName = "<Enter_your_game_name>";
DateTime startDate = null; /* Get date from your source */
DateTime endDate = null; /* Get date from your source */
Game game = scoreBoardService.getTopNRankers(gameName,startDate,endDate,max); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
int max = 10;
$gameName = "<Enter_your_game_name>";
$startDate = null; /* Get date from your source */
$endDate = null; /* Get date from your source */
$game = $scoreBoardService->getTopNRankers($gameName,$startDate,$endDate,$max);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
Coming Soon
var gameName:String = "<Enter_your_game_name>";	
var startDate:Date = null; /* Get date from your source */
var endDate:Date = null; /* Get date from your source */
var max:int = 5;
scoreBoardService.getTopNRankers(gameName,startDate,endDate,max, new callback()); 
public class callback implements App42CallBack  
{   
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top N Rankers By Group

Retrieves the Top Rankings for the specified game.

Required Parameters

gameName - Name of the game for which ranks have to be fetched. userList - List of user from which ranking has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
ArrayList<String> userList = new ArrayList<String>();
userList.add("Nick");
userList.add("John");
userList.add("Balley");
Game game = scoreBoardService.getTopNRankersByGroup(gameName,userList); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
IList<String> userList = new IList<String>();
userList.Add("Nick");
userList.Add("John");
userList.Add("Balley");
scoreBoardService.getTopNRankersByGroup(gameName,userList,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSArray *userList = [[NSArray alloc]initWithObjects:@"Nick", nil];
Game *game = [scoreBoardService getTopNRankersByGroup:gameName userList:userList]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
Vector userList = new Vector();
userList.addElement("Nick");
userList.addElement("John");
userList.addElement("Balley");
Game game = scoreBoardService.getTopNRankersByGroup(gameName,userList); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
ArrayList<String> userList = new ArrayList<String>();
userList.add("Nick");
userList.add("John");
userList.add("Balley");
Game game = scoreBoardService.getTopNRankersByGroup(gameName,userList); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
IList<String> userList = new List<String>();
userList.Add("Nick");
userList.Add("John");
userList.Add("Balley");
scoreBoardService.getTopNRankersByGroup(gameName,userList, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>";
var userList = new Array();
userList.push("Nick");
userList.push("John");
userList.push("Balley");
var result ;  
scoreBoardService.getTopNRankersByGroup(gameName,userList,{  
	success: function(object)
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
IList<String> userList = new List<String>();
userList.Add("Nick");
userList.Add("John");
userList.Add("Balley");
Game game = scoreBoardService.getTopNRankersByGroup(gameName,userList); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$userList = array();
array_push($userList, "Nick");
array_push($userList, "John");
array_push($userList, "Balley");
$game = $scoreBoardService->getTopNRankersByGroup($gameName,$userList);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
Coming Soon
 
var gameName:String = "<Enter_your_game_name>";	
var userList:Array = new Array();
userList.push("Nick");
userList.push("John");
userList.push("Balley");
scoreBoardService.getTopNRankersByGroup(gameName,userList, new callback());  
public class callback implements App42CallBack  
{ 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get User Ranking

Required Parameters

gameName - Name of the game for which score has to be fetched. userName - The user for which score has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getUserRanking(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("rank is : " + game.getScoreList().get(i).getRank());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetUserRanking(gameName,userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("rank is : " + game.GetScoreList()[i].GetRank());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
Game *game = [scoreBoardService getUserRanking:gameName gameUserName:userName]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"Rank is = %f",score.rank); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getUserRanking(gameName,userName); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
	 System.out.println("rank is " + score.getRank());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getUserRanking(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("rank is : " + game.getScoreList().get(i).getRank());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetUserRanking(gameName, userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("rank is : " + game.GetScoreList()[i].GetRank());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
result ;  
scoreBoardService.getUserRanking(gameName,userName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("rank is : " + scoreList.rank)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.GetUserRanking(gameName,userName); 
Console.WriteLine("gameName is " + game.GetName());
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("rank is : " + game.GetScoreList()[i].GetRank());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}  
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$game = $scoreBoardService->getUserRanking($gameName,$userName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
std::string gameName = "<Enter_your_game_name>";
std::string userName = "Nick";
scoreBoardService->GetUserRanking(gameName,userName,authGameCallback);
ScoreBoardService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
game_name = "<Enter_your_game_name>";
userName = "Nick";
game = score_board_service.get_user_ranking(game_name,user_name);
puts"Game Name is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end
json_response = game.to_s();
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";	
scoreBoardService.getUserRanking(gameName,userName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Last Score By User

This function returns the top score attained by the specified user in the game.

Required Parameters

gameName - Name of the game for which score has to be fetched. userName - The user for which score has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getLastScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetLastScoreByUser(gameName,userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
Game *game = [scoreBoardService getLastScoreByUser:gameName gameUserName:userName]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getLastScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.getLastScoreByUser(gameName,userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
scoreBoardService.GetLastScoreByUser(gameName, userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
result ;  
scoreBoardService.getLastScoreByUser(gameName,userName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
Game game = scoreBoardService.GetLastScoreByUser(gameName,userName); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$game = $scoreBoardService->getLastScoreByUser($gameName,$userName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
class CApp42Callback : public IApp42Callback
{
       public:
               void onResult(App42Result* result){
                       IwDebugTraceLinePrintf("GameResult::body is %s", result->getBody().c_str());
               }
};
CApp42Callback* authGameCallback = NULL;
std::string gameName = "<Enter_your_game_name>";
std::string userName = "Nick";
scoreBoardService->GetLastScoreByUser(gameName,userName,authGameCallback);
ScoreBoardService::Terminate();
if(authGameCallback)
{
       delete authGameCallback;
       authGameCallback = NULL;
}
Coming Soon
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";	
scoreBoardService.getLastScoreByUser(gameName,userName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Last Game Score

This function returns the score attained by the specified user in the last game session.

Required Parameters

userName - Name of the for which score has to fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
Game game = scoreBoardService.getLastGameScore(userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String userName = "Nick";
scoreBoardService.GetLastGameScore(userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *userName = @"Nick";
Game *game = [scoreBoardService getLastGameScore:userName]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String userName = "Nick";
Game game = scoreBoardService.getLastGameScore(userName); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String userName = "Nick";
Game game = scoreBoardService.getLastGameScore(userName); 
System.out.println("gameName is " + game.getName());

String userName = "Nick";
scoreBoardService.GetLastGameScore(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var userName = "Nick",
result ;  
scoreBoardService.getLastGameScore(userName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
Game game = scoreBoardService.GetLastGameScore(userName); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$userName = "Nick";
$game = $scoreBoardService->getLastGameScore($userName);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
Coming Soon
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";	
scoreBoardService.getLastGameScore(gameName,userName, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Edit Score Value By Id

Edit the score value for the game in exiting score id.

Required Parameters

scoreId - ScoreId of the gameUser for which value have to be added. gameScore - The scores that have to be added.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String scoreId = "scoreId";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreBoardService.editScoreValueById(scoreId,gameScore); 
System.out.println("gameName is  " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String scoreId = "scoreId";
double gameScore = 3500;
scoreBoardService.EditScoreValueById(scoreId,gameScore,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *scoreId = @"scoreId";
double gameScore = 3500;
Game *game = [scoreBoardService editScoreValueById:scoreId gameScore:gameScore]; 
NSLog(@"gameName is  = %@" game.name);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
	NSLog(@"scoreId is = %f",score.scoreId); 
}
String scoreId = "scoreId";
double gameScore = 3500;
Game game = scoreBoardService.editScoreValueById(scoreId,gameScore); 
System.out.println("gameName is  " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}
String scoreId = "scoreId";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreBoardService.editScoreValueById(scoreId,gameScore); 
System.out.println("gameName is  " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
String scoreId = "scoreId";
double gameScore = 3500;
scoreBoardService.EditScoreValueById(scoreId, gameScore, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var scoreId = "scoreId",
gameScore = 3500,
result ;  
scoreBoardService.editScoreValueById(scoreId,gameScore,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("scoreId is : " + scoreList.scoreId)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String scoreId = "scoreId";
double gameScore = 3500;
Game game = scoreBoardService.EditScoreValueById(scoreId,gameScore); 
Console.WriteLine("gameName is  " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
	}
$scoreId = "scoreId";
$gameScore = 3500;
$game = $scoreBoardService->editScoreValueById($scoreId,$gameScore);
print_r("gameName is  " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
Coming Soon
var scoreId:String = "scoreId";	
var gameScore:int = 2000;	
scoreBoardService.editScoreValueById(scoreId,gameScore, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Add Score

Adds game score for the specified user.

Required Parameters

gameName - Name of the game for which scores have to be added userName - The user for whom scores have to be added. gameScore - The scores that have to be added.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreService.addScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
scoreService.AddScore(gameName,userName,gameScore,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
double gameScore = 3500;
Game *game = [scoreService addScore:gameName gameUserName:userName gameScore:gameScore]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
Game game = scoreService.addScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreService.addScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
scoreService.AddScore(gameName,userName,gameScore, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
		}
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
gameScore = 3500,
result ;  
scoreService.addScore(gameName,userName,gameScore,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
Game game = scoreService.AddScore(gameName,userName,gameScore); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
	}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$gameScore = 3500;
$game = $scoreService->addScore($gameName,$userName,$gameScore);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
game_name = "<Enter_your_game_name>";
game_user_name = "Nick";
game_score = 1000000;						
game = score_service.add_score(game_name, game_user_name, game_score );
puts "gameName is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end

 
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";	
var gameScore:int = 2000;	
scoreService.addScore(gameName,userName,gameScore, new callback());  
public class callback implements App42CallBack  
{ 
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Deduct Score

Deduct game score for the specified user.

Required Parameters

gameName - Name of the game for which scores have to be Deducted. userName - The user for whom scores have to be Deducted. gameScore - The scores that have to be Deducted.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreService.deductScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
scoreService.DeductScore(gameName,userName,gameScore,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
NSString *gameName = @"<Enter_your_game_name>";
NSString *userName = @"Nick";
double gameScore = 3500;
Game *game = [scoreService deductScore:gameName gameUserName:userName gameScore:gameScore]; 
NSLog(@"gameName is = %@" game.gameName);
NSMutableArray *scoreList = game.scoreList;
for(Score *score in scoreList)
{
	NSLog(@"User Name is = %@",score.userName);
	NSLog(@"Value is = %f",score.value); 
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
Game game = scoreService.deductScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
BigDecimal gameScore = new BigDecimal(3500);
Game game = scoreService.deductScore(gameName,userName,gameScore); 
System.out.println("gameName is " + game.getName());
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
}
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
scoreService.DeductScore(gameName, userName, gameScore, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
		}
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
gameScore = 3500,
result ;  
scoreService.deductScore(gameName,userName,gameScore,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		console.log("userName is : " + scoreList.userName)
		console.log("value is : " + scoreList.value)
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "Nick";
double gameScore = 3500;
Game game = scoreService.DeductScore(gameName,userName,gameScore); 
Console.WriteLine("gameName is " + game.GetName());  
for(int i = 0;i<game.GetScoreList().Count;i++)
	{
		Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
		Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
	}
$gameName = "<Enter_your_game_name>";
$userName = "Nick";
$gameScore = 3500;
$game = $scoreService->deductScore($gameName,$userName,$gameScore);
print_r("gameName is " . $game->getName());
$scoreList = $game->getScoreList();
foreach( $scoreList as $score )
{
print_r("User Name is " . $score->getUserName());
print_r("Value is " . $score->getValue());
}
Coming Soon
game_name = "<Enter_your_game_name>";
game_user_name = "Nick";
game_score = 999900;					
game = score_service.deduct_score(game_name, game_user_name, game_score);
puts "gameName is #{game.name}";
score_list = Array.new();
score_list = game.score_list();
for score in score_list do
  puts "userName is #{score.user_name}";
  puts "value is #{score.value}";
end
json_response = game.to_s();
var gameName:String = "<Enter_your_game_name>";	
var userName:String = "userName";	
var gameScore:int = 2000;	
scoreService.deductScore(gameName,userName,gameScore, new callback());  
public class callback implements App42CallBack  
{  
	public function onException(excption:App42Exception):void  
	{  
		trace("Exception Message");  
	}  
	public function onSuccess(response:Object):void  
	{  
		var game:Game = Game(response);  
		trace("response is : " + game);
	}  
}  
Coming Soon 

Get Top Rankers From Buddy Group

This function returns the specified number of top rankers in a specific game in buddy group.

Required Parameters

gameName- Name of the game. userName- Name of the user who fetch scores in group. owerName- Group owner name. GroupName- Name of group.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
String gameName = "<Enter_your_game_name>";
String userName = "userName";
String ownerName = "ownerName";
String groupName = "groupName";
Game game = scoreBoardService.getTopRankersFromBuddyGroup(gameName, userName, ownerName, groupName);
System.out.println(game.getScoreList().get(0).getUserName()); 
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String userName = "userName";
String ownerName = "ownerName";
String groupName = "groupName";
Game game = scoreBoardService.getTopRankersFromBuddyGroup(gameName, userName,
				ownerName, groupName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;     
		Console.WriteLine("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
			Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
			Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}  
}
coming Soon					                                             
String gameName = "gameName" ;
String buddyName = "buddyName";
String ownerName = "ownerName" ;
String groupName = "groupName";
Game game = scoreBoardService.getTopRankersFromBuddyGroup(gameName, buddyName, ownerName, groupName);
System.out.println("GameName is "  + game.getName());
Vector scoreList =  game.getScoreList();
for(int i=0;i < scoreList.size();i++)
{ 
	Game.Score score = (Game.Score)  scoreList.elementAt(i);
	System.out.println("userName is " + score.getUserName());
    System.out.println("value is " + score.getValue());
    System.out.println("scoreId is " + score.getScoreId());
}         
 String gameName = "<Enter_your_game_name>";
String userName = "userName";
String ownerName = "ownerName";
String groupName = "groupName";
Game game = scoreBoardService.getTopRankersFromBuddyGroup(gameName, userName, ownerName, groupName);
System.out.println(game.getScoreList().get(0).getUserName());	
for(int i = 0;i<game.getScoreList().size();i++)
{
	System.out.println("userName is : " + game.getScoreList().get(i).getUserName());
	System.out.println("score is : " + game.getScoreList().get(i).getValue());
	System.out.println("scoreId is : " + game.getScoreList().get(i).getScoreId());
}		
String gameName = "<Enter_your_game_name>";
String userName = "userName";
String ownerName = "ownerName";
String groupName = "groupName";
scoreBoardService.GetTopRankersFromBuddyGroup(gameName, userName, ownerName, groupName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Game game = (Game) response;     
		App42Log.Console("gameName is " + game.GetName()); 
		for(int i = 0;i<game.GetScoreList().Count;i++)
		{
			App42Log.Console("userName is : " + game.GetScoreList()[i].GetUserName());
			App42Log.Console("score is : " + game.GetScoreList()[i].GetValue());
			App42Log.Console("scoreId is : " + game.GetScoreList()[i].GetScoreId());
		}
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
var gameName = "<Enter_your_game_name>",
userName = "Nick",
ownerName = "ownerName",
groupName = "groupName",
var result ;  
scoreBoard.getTopRankersFromBuddyGroup(gameName,userName,ownerName,groupName,{  
	success: function(object) 
	{  
		var game = JSON.parse(object);  
		result = game.app42.response.games.game;
		console.log("gameName is : " + result.name)
		var scoreList = result.scores.score;
		for(var i=0;i<scoreList.length;i++)
		{
			console.log("userName is : " + scoreList[i].userName)
			console.log("scoreId is : " + scoreList[i].scoreId)
			console.log("value is : " + scoreList[i].value)
		}
	},  
	error: function(error) {  
	}  
}); 
String gameName = "<Enter_your_game_name>";
String userName = "userName";
String ownerName = "ownerName";
String groupName = "groupName";
Game game = scoreBoardService.GetTopRankersFromBuddyGroup(gameName, userName, ownerName, groupName);
for(int i = 0;i<game.GetScoreList().Count;i++)
{
	Console.WriteLine("userName is : " + game.GetScoreList()[i].GetUserName());
	Console.WriteLine("score is : " + game.GetScoreList()[i].GetValue());
	Console.WriteLine("scoreId is : " + game.GetScoreList()[i].GetScoreId());
}
Coming Soon
Coming Soon
Coming Soon
Coming Soon
Coming Soon

Exception Handling

The functions available under Gaming API can throw some exceptions in abnormal conditions. Example of the same has been given below. E.g. If App developer is creating a game with name which is already in database, the function will throw the App42Exception (as shown below) with message as “Bad Request” and the appErrorCode as “3000” and the details as “The request parameters are invalid. Game with the name ‘gameName’ already exists”.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
String gameName = "<Enter_your_game_name>";
String description = "description";
try
{
	Game game = gameService.createGame(gameName,description);
}
catch(App42Exception exception) 
{
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 3000)
	{
		// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.getMessage(); /* returns the Exception text in JSON format. (as shown below)*/	
}               
public class Callback : App42Callback  
{  
String gameName = "<Enter_your_game_name>";
String description = "description";
gameService.createGame(gameName,description, this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
		int appErrorCode = exception.GetAppErrorCode();
		int httpErrorCode = exception.GetHttpErrorCode();
		if(appErrorCode == 3000)
		{
			// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
		}
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
		String jsonText = exception.GetMessage(); /* returns the Exception text in JSON format. (as shown below)*/ 
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
		Game game = (Game) response;
		  
	}  
}  
					
NSString *gameName = @"<Enter_your_game_name>";
NSString *description = @"description";
@try{
	Game *game = [gameService createGame:gameName description:description];  /* returns the Game object. */ 
} @catch(App42Exception *ex) {
	int appErrorCode = ex.appErrorCode;
	int httpErrorCode = ex.httpErrorCode;
	if(appErrorCode == 3000)
	{
		// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	NSString *jsonText = ex.reason; /* returns the Exception text in JSON format. (as shown below)*/	
}                                               
String gameName = "<Enter_your_game_name>";
String description = "description";
try
{
	Game game = gameService.createGame(gameName,description);
}
catch(App42Exception exception) 
{
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 3000)
	{
		// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.getMessage(); /* returns the Exception text in JSON format. (as shown below)*/	
}               
String gameName = "<Enter_your_game_name>";
String description = "description";
try
{
	Game game = gameService.createGame(gameName,description);
}
catch(App42Exception exception) 
{
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 3000)
	{
		// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.getMessage(); /* returns the Exception text in JSON format. (as shown below)*/	
}               
Coming Soon
var gameName = "<Enter_your_game_name>",
var description = "description";
gameService.createGame(gameName,description,{
	success: function(object) {
	},
	error: function(error) {
		var userObj = JSON.parse(error);
		appErrorCode = userObj.app42Fault.appErrorCode;
		if(appErrorCode == 3000)
		{
			// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
		}
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
	}
	});
String gameName = "<Enter_your_game_name>";
String description = "description";
try
{
	Game game = gameService.CreateGame(gameName,description);
}
catch(App42Exception exception) 
{
	int appErrorCode = exception.GetAppErrorCode();
	int httpErrorCode = exception.GetHttpErrorCode();
	if(appErrorCode == 3000)
	{
		// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.GetMessage(); /* returns the Exception text in JSON format. (as shown below)*/	
}               
$gameName = "<Enter_your_game_name>";
$description = "description";
try
{
	$game = $gameService->createGame($gameName,$description);
} 
catch(App42Exception $ex) 
{
	$appErrorCode = $ex->getAppErrorCode();
	$httpErrorCode = $ex->getHttpErrorCode();
	if(appErrorCode == 3000)
	{
		// Handle here for Bad Request (The request parameters are invalid. Game with the name 'gameName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	$jsonText = $ex->getMessage(); /* returns the Exception text in JSON format. (as shown below)*/	
}
Coming Soon
Coming Soon
Coming Soon
Coming Soon

Error Codes

Functions in Game API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):

1400 - BAD REQUEST - The Request parameters are invalid. 1401 - UNAUTHORIZED - Client is not authorized. 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again. 3000 - BAD REQUEST - The request parameters are invalid. Game with the name '@name' already exists. 3001 - NOT FOUND - Games do not exist. 3002 - NOT FOUND - Game with the name '@name' does not exist. 3003 - NOT FOUND - Game with id '@gameId' does not exist. 3004 - BAD REQUEST - The request parameters are invalid. Reward with the name '@rewardName' already exists. 3005 - NOT FOUND - Rewards do not exist. 3006 - NOT FOUND - Reward with the name '@name' does not exist. 3007 - NOT FOUND - User with the name '@userName' does not exist. 3008 - BAD REQUEST - The request parameters are invalid. Do not have enough reward points to redeem. 3009 - BAD REQUEST - The request parameters are invalid. Do not have enough scores to deduct. 3010 - NOT FOUND - Scores for the user with the name '@userName' for the game with the name '@name' do not exist. 3011 - NOT FOUND - The number of the games are less than the specified offset : &lt;offset&gt;. 3012 - NOT FOUND - The number of the rewards are less than the specified offset : &lt;offset&gt;. 3013 - NOT FOUND - Scores for the game with the name '@name' does not exist. 3014 - NOT FOUND - Reward Points for the user with the name '@userName' do not exist. 3015 - NOT FOUND - Scores betweem startDate '@startDate' and endDate '@endDate' for the game with the name '@name' does not exist. 3016 - NOT FOUND - Scores with users '@userList' for the game with the name '@name' does not exist.