String gameName = "Game02"; String userName = "Nick"; double gameScore = 2000; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.BuildScoreBoardService(); scoreBoardService.SaveUserScore(gameName, userName, gameScore,requestCallback); OnSuccess(Object obj) { Game game = (Game) obj; String jsonResponse = game.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Game game = (Game) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String gameName = "Game02"; String gameUserName = "Nick"; double gameScore = 400000 ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.buildScoreBoardService(); Game game = scoreBoardService.saveUserScore(gameName, gameUserName, gameScore); String jsonResponse = game.toString();
String gameName = "Game02"; String gameUserName = "Nick"; double gameScore = 400000 ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.buildScoreBoardService(); Game game = scoreBoardService.saveUserScore(gameName, gameUserName, gameScore); String jsonResponse = game.toString();
NSString *gameName = @"Game02"; NSString *gameUserName = @"Nick"; double gameScore = 400000; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; ScoreBoardService *scoreBoardService = [serviceAPIObj buildScoreBoardService]; Game *game = [scoreBoardService saveUserScore:gameName gameUserName:gameUserName gameScore:gameScore]; NSString *jsonResponse = [game toString];
String gameName = "Game02"; String gameUserName = "Nick"; double gameScore = 400000 ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.buildScoreBoardService(); Game game = scoreBoardService.saveUserScore(gameName, gameUserName, gameScore); String jsonResponse = game.toString();
String gameName = "Game02"; String gameUserName = "Nick"; double gameScore = 400000 ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.BuildScoreBoardService(); Game game = scoreBoardService.SaveUserScore(gameName, gameUserName, gameScore); String jsonResponse = game.ToString();
gameName = "Game02"; gameUserName = "Nick"; gameScore = 400000; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); scoreBoardService = api.buildScoreBoardService(); game = scoreBoardService.save_user_score(gameName, gameUserName, gameScore); jsonResponse = game.to_s();
The request format for saveUserScore is URL : https://api.shephertz.com/cloud/1.0/game/scoreboard Method : POST QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json Body : {"app42": {"game": {"name": "Game02","scores": {"score": {"userName": "Nick","value": 400000,}}}}}
var game = new App42ScoreBoard(); var gameName = "Game02"; var userName = "Nick"; // In order to use the various functions available under a particular API, a developer will have to call the // App42.initialize method by passing the apiKey and the secretKey. App42.initialize("<API_KEY>","<SECRET_KEY>"); game.saveUserScore(gameName, userName, 40000,{ success: function(object) { // Game Object creation }, error: function(error) { // Game exception handled } });
$gameName = "Game02"; $gameUserName = "Nick"; $gameScore = 400000; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $scoreBoardService = $api->buildScoreBoardService(); $game = $scoreBoardService->saveUserScore($gameName, $gameUserName, $gameScore); $jsonResponse = $game->toString();
String gameName = "Game02"; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.BuildScoreBoardService(); scoreBoardService.GetTopRankings(gameName,this); OnSuccess(Object obj) { Game game = (Game) obj; String jsonResponse = game.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Game game = (Game) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String gameName = "Game02"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.buildScoreBoardService(); Game game = scoreBoardService.getTopRankings(gameName); String jsonResponse = game.toString();
String gameName = "Game02"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.buildScoreBoardService(); Game game = scoreBoardService.getTopRankings(gameName); String jsonResponse = game.toString();
NSString *gameName = @"Game02"; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; ScoreBoardService *scoreBoardService = [serviceAPIObj buildScoreBoardService]; Game *game = [scoreBoardService getTopRankings:gameName]; NSString *jsonResponse = [game toString];
String gameName = "Game02"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.buildScoreBoardService(); Game game = scoreBoardService.getTopRankings(gameName); String jsonResponse = game.toString();
String gameName = "Game02"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); ScoreBoardService scoreBoardService = api.BuildScoreBoardService(); Game game = scoreBoardService.GetTopRankings(gameName); String jsonResponse = game.ToString();
gameName = "Game02"; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); scoreBoardService = api.buildScoreBoardService(); game = scoreBoardService.get_top_rankings(gameName); jsonResponse = game.to_s();
The request format for getTopRankings is URL : https://api.shephertz.com/cloud/1.0/game/scoreboard/{gameName}/ranking Method : GET QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json
var game = new App42ScoreBoard(); var gameName = "Game02"; // In order to use the various functions available under a particular API, a developer will have to call the // App42.initialize method by passing the apiKey and the secretKey. App42.initialize("<API_KEY>","<SECRET_KEY>"); game.getTopRankings(gameName,{ success: function(object) { // Game Object creation }, error: function(error) { // Game exception handled } });
$gameName = "Game02"; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $scoreBoardService = $api->buildScoreBoardService(); $game = $scoreBoardService->getTopRankings($gameName); $jsonResponse = $game->toString();
String rewardName = "Reward01"; String rewardDescription = "Reward Description"; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.BuildRewardService(); rewardService.CreateReward(rewardName, rewardDescription,requestCallback); OnSuccess(Object obj) { Reward reward = (Reward) obj; String jsonResponse = reward.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Reward reward = (Reward) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String rewardName = "Reward01"; String rewardDescription = "Reward Description"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.createReward(rewardName, rewardDescription); String jsonResponse = reward.toString();
String rewardName = "Reward01"; String rewardDescription = "Reward Description"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.createReward(rewardName, rewardDescription); String jsonResponse = reward.toString();
NSString *rewardName = @"Reward01"; NSString *rewardDescription = @"Reward Description"; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; RewardService *rewardService = [serviceAPIObj buildRewardService]; Reward *reward = [rewardService createReward:rewardName rewardDescription:rewardDescription]; NSString *jsonResponse = [reward toString];
String rewardName = "Reward01"; String rewardDescription = "Reward Description"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.BuildRewardService(); Reward reward = rewardService.createReward(rewardName, rewardDescription); String jsonResponse = reward.toString();
String rewardName = "Reward01"; String rewardDescription = "Reward Description"; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.BuildRewardService(); Reward reward = rewardService.CreateReward(rewardName, rewardDescription); String jsonResponse = reward.ToString();
rewardName = "Reward01"; rewardDescription = "Reward Description"; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); rewardService = api.buildRewardService(); reward = rewardService.create_reward(rewardName, rewardDescription); jsonResponse = reward.to_s();
The request format for createReward is URL : https://api.shephertz.com/cloud/1.0/game/reward Method : POST QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json Body : {"app42": {"rewards": {"reward": {"name": "Reward01","description": "Reward Description"}}}}
var reward = new App42Reward(); var rewardName = "Reward01"; var rewardDescription = "Reward Description"; // In order to use the various functions available under a particular API, a developer will have to call the // App42.initialize method by passing the apiKey and the secretKey. App42.initialize("<API_KEY>","<SECRET_KEY>"); reward.createReward(rewardName,rewardDescription,{ success: function(object) { // Reward Object creation }, error: function(error) { // Reward exception handled } });
$rewardName = "Reward01"; $rewardDescription = "Reward Description"; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $rewardService = $api->buildRewardService(); $reward = $rewardService->createReward($rewardName, $rewardDescription); $jsonResponse = $reward->toString();
String gameName = "Game01"; String userName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 1000; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.BuildRewardService(); rewardService.EarnRewards(gameName,userName,rewardName,rewardPoints,requestCallback); OnSuccess(Object obj) { Reward reward = (Reward) obj; String jsonResponse = reward.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Reward reward = (Reward) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 1000; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.earnRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.toString();
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 1000; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.earnRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.toString();
NSString *gameName = @"Game01"; NSString *gameUserName = @"Nick"; NSString *rewardName = @"Reward01"; double rewardPoints = 1000; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; RewardService *rewardService = [serviceAPIObj buildRewardService]; Reward *reward = [rewardService earnRewards:gameName gameUserName:gameUserName rewardName:rewardName rewardPoints:rewardsPoints]; NSString *jsonResponse = [reward toString];
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 1000; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.earnRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.toString();
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 1000; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.BuildRewardService(); Reward reward = rewardService.EarnRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.ToString();
gameName = "Game01"; gameUserName = "Nick"; rewardName = "Reward01"; rewardPoints = 1000; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); rewardService = api.buildRewardService(); reward = rewardService.earn_rewards(gameName, gameUserName, rewardName, rewardPoints); jsonResponse = reward.to_s();
The request format for earnRewards is URL : https://api.shephertz.com/cloud/1.0/game/reward/earn Method : POST QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json Body : {"app42": {"rewards": {"reward": {"gameName": "Game01","userName": "Nick","name": "Reward01","points": 1000}}}}
var reward = new App42Reward(); var gameName = "Game01"; var rewardName = "Reward01"; var userName = "Nick"; // In order to use the various functions available under a particular API, a developer will have to call the // App42.initialize method by passing the apiKey and the secretKey. App42.initialize("<API_KEY>","<SECRET_KEY>"); reward.earnRewards(gameName, rewardName, userName, 1000, { success: function(object) { // Reward Object creation }, error: function(error) { // Reward exception handled } });
$gameName = "Game01"; $gUserName = "Nick"; $rewardName = "Reward01"; $rewardPoints = 1000; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $rewardService = $api->buildRewardService(); $reward = $rewardService->earnRewards($gName, $gUserName, $rewardName, $rewardPoints); $jsonResponse = $reward->toString();
String gameName = "Game01"; String userName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 900; App42Callback requestCallback = this; /* This function used the App42Callback interface */ ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.BuildRewardService(); rewardService.RedeemRewards(gameName,userName,rewardName,rewardPoints,requestCallback); OnSuccess(Object obj) { Reward reward = (Reward) obj; String jsonResponse = reward.ToString(); } public class CallBack : App42Callback { public override void OnSuccess(Object obj) { Reward reward = (Reward) obj; //Do whatever you want with the object } public override void OnException(App42Exception e) { //Do whatever you want with the exception } }
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 900; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.redeemRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.toString();
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 900; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.redeemRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.toString();
NSString *gameName = @"Game01"; NSString *gameUserName = @"Nick"; NSString *rewardName = @"Reward01"; double rewardPoints = 900; ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init]; serviceAPIObj.apiKey = @"<API_KEY>"; serviceAPIObj.secretKey = @"<SECRET_KEY>"; RewardService *rewardService = [serviceAPIObj buildRewardService]; Reward *reward = [rewardService redeemRewards:gameName gameUserName:gameUserName rewardName:rewardName rewardPoints:rewardsPoints]; NSString *jsonResponse = [reward toString];
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 900; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.buildRewardService(); Reward reward = rewardService.redeemRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.toString();
String gameName = "Game01"; String gameUserName = "Nick"; String rewardName = "Reward01"; double rewardPoints = 900; ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); RewardService rewardService = api.BuildRewardService(); Reward reward = rewardService.RedeemRewards(gameName, gameUserName, rewardName, rewardPoints); String jsonResponse = reward.ToString();
gameName = "Game01"; gameUserName = "Nick"; rewardName = "Reward01"; rewardPoints = 900; api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>"); rewardService = api.buildRewardService(); reward = rewardService.redeem_rewards(gameName, gameUserName, rewardName, rewardPoints); jsonResponse = reward.to_s();
The request format for redeemRewards is URL : https://api.shephertz.com/cloud/1.0/game/reward/redeem Method : POST QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP> Accept : application/json Content-Type : application/json Body : {"app42": {"rewards": {"reward": {"gameName": "Game01","userName": "Nick","name": "Reward01","points": 900}}}}
var reward = new App42Reward(); var gameName = "Game01"; var rewardName = "Reward01"; var userName = "Nick"; // In order to use the various functions available under a particular API, a developer will have to call the // App42.initialize method by passing the apiKey and the secretKey. App42.initialize("<API_KEY>","<SECRET_KEY>"); reward.redeemRewards(gameName, rewardName, userName, 1000, { success: function(object) { // Reward Object creation }, error: function(error) { // Reward exception handled } });
$gName = "Game01"; $gUserName = "Nick"; $rewardName = "Reward01"; $rewardPoints = 900; $api = new ServiceAPI("<API_KEY>","<SECRET_KEY>"); $rewardService = $api->buildRewardService(); $reward = $rewardService->redeemRewards($gName, $gUserName, $rewardName, $rewardPoints); $jsonResponse = $reward->toString();