Skip to content

Commit

Permalink
Removed publickey field from achievements test
Browse files Browse the repository at this point in the history
  • Loading branch information
benlowry committed May 18, 2013
1 parent 2e1a108 commit c9c0299
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/com/playtomic/as3/Response.as
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package com.playtomic.as3 { public class Response extends Object { private static const ERRORS:Object = new Object(); // General Errors ERRORS[0] = "Nothing went wrong!"; ERRORS[1] = "General error, this typically means the player is unable to connect to the server."; ERRORS[2] = "Invalid game credentials. Make sure you use the right public and private keys."; ERRORS[3] = "Request timed out."; ERRORS[4] = "Invalid request."; // GeoIP Errors ERRORS[100] = "GeoIP API has been disabled for this game."; // Leaderboard Errors ERRORS[200] = "Leaderboard API has been disabled for this game."; ERRORS[201] = "The player's name wasn't provided."; ERRORS[203] = "Player is banned from submitting scores in this game."; ERRORS[204] = "Score was not saved because it was not the player's best. You can allow players to have more than one score by specifying allowduplicates=true in your save options."; // GameVars Errors ERRORS[300] = "GameVars API has been disabled for this game."; // LevelSharing Errors ERRORS[400] = "Level sharing API has been disabled for this game."; ERRORS[401] = "Invalid rating value (must be 1 - 10)."; ERRORS[402] = "Player has already rated that level."; ERRORS[403] = "Missing level name"; ERRORS[404] = "Missing level id."; ERRORS[405] = "Level already exists."; // Achievement Errors ERRORS[500] = "Achievements API has been disabled for this game."; ERRORS[501] = "Missing playerid"; ERRORS[502] = "Missing player name"; ERRORS[503] = "Missing achievementid"; ERRORS[504] = "Invalid achievementid or achievement key"; ERRORS[505] = "Player already had the achievement. You can overwrite old achievements with overwrite=true or save each time the player is awarded with allowduplicates=true"; ERRORS[506] = "Player already had the achievement and it was overwritten or a duplicate was saved successfully"; public var success:Boolean = false; public var errorcode:int = 0; /** * Creates a response * @param status The status returned from the server * @param errorcode The errorcode returned from the server */ public function Response(s:Boolean, e:int){ success = s; errorcode = e; } /** * Returns the error message for a number */ public function get errorMessage():String{ return ERRORS[errorcode]; } }}
package com.playtomic.as3 { public class Response extends Object { private static const ERRORS:Object = new Object(); // General Errors ERRORS[0] = "Nothing went wrong!"; ERRORS[1] = "General error, this typically means the player is unable to connect to the server."; ERRORS[2] = "Invalid game credentials. Make sure you use the right public and private keys."; ERRORS[3] = "Request timed out."; ERRORS[4] = "Invalid request."; // GeoIP Errors ERRORS[100] = "GeoIP API has been disabled for this game."; // Leaderboard Errors ERRORS[200] = "Leaderboard API has been disabled for this game."; ERRORS[201] = "The player's name wasn't provided."; ERRORS[203] = "Player is banned from submitting scores in this game."; ERRORS[204] = "Score was not saved because it was not the player's best. You can allow players to have more than one score by specifying allowduplicates=true in your save options."; // GameVars Errors ERRORS[300] = "GameVars API has been disabled for this game."; // LevelSharing Errors ERRORS[400] = "Level sharing API has been disabled for this game."; ERRORS[401] = "Invalid rating value (must be 1 - 10)."; ERRORS[402] = "Player has already rated that level."; ERRORS[403] = "Missing level name"; ERRORS[404] = "Missing level id."; ERRORS[405] = "Level already exists."; // Achievement Errors ERRORS[500] = "Achievements API has been disabled for this game."; ERRORS[501] = "Missing playerid"; ERRORS[502] = "Missing player name"; ERRORS[503] = "Missing achievementid"; ERRORS[504] = "Invalid achievementid or achievement key"; ERRORS[505] = "Player already had the achievement. You can overwrite old achievements with overwrite=true or save each time the player is awarded with allowduplicates=true"; ERRORS[506] = "Player already had the achievement and it was overwritten or a duplicate was saved successfully"; public var success:Boolean = false; public var errorcode:int = 0; /** * Creates a response * @param status The status returned from the server * @param errorcode The errorcode returned from the server */ public function Response(s:Boolean, e:int){ success = s; errorcode = e; } /** * Returns the error message for a number */ public function get errorMessage():String{ return ERRORS[errorcode]; } }}
Expand Down
18 changes: 5 additions & 13 deletions src/com/playtomic/as3/TestAchievements.as
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ package com.playtomic.as3
var section:String = "TestAchievements.list";

var achievements:Array = [
{ fields: { rnd: rnd}, publickey: "testpublickey", achievement: "Super Mega Achievement #1", achievementkey: "secretkey", playerid: "1", playername: "ben" },
{ fields: { rnd: rnd}, publickey: "testpublickey", achievement: "Super Mega Achievement #1", achievementkey: "secretkey", playerid: "2", playername: "michelle" },
{ fields: { rnd: rnd}, publickey: "testpublickey", achievement: "Super Mega Achievement #1", achievementkey: "secretkey", playerid: "3", playername: "peter" },
{ fields: { rnd: rnd}, publickey: "testpublickey", achievement: "Super Mega Achievement #2", achievementkey: "secretkey2", playerid: "3", playername: "peter" },
{ fields: { rnd: rnd}, publickey: "testpublickey", achievement: "Super Mega Achievement #2", achievementkey: "secretkey2", playerid: "2", playername: "michelle" }
{ fields: { rnd: rnd}, achievement: "Super Mega Achievement #1", achievementkey: "secretkey", playerid: "1", playername: "ben" },
{ fields: { rnd: rnd}, achievement: "Super Mega Achievement #1", achievementkey: "secretkey", playerid: "2", playername: "michelle" },
{ fields: { rnd: rnd}, achievement: "Super Mega Achievement #1", achievementkey: "secretkey", playerid: "3", playername: "peter" },
{ fields: { rnd: rnd}, achievement: "Super Mega Achievement #2", achievementkey: "secretkey2", playerid: "3", playername: "peter" },
{ fields: { rnd: rnd}, achievement: "Super Mega Achievement #2", achievementkey: "secretkey2", playerid: "2", playername: "michelle" }
];

function s():void {
Expand All @@ -32,7 +32,6 @@ package com.playtomic.as3
}

var options:Object = {
publickey: "testpublickey",
filters: { rnd: rnd }
};

Expand All @@ -54,7 +53,6 @@ package com.playtomic.as3
var section:String = "TestAchievements.listWithFriends";

var options:Object = {
publickey: "testpublickey",
friendslist: ["1", "2", "3"],
filters: { rnd: rnd }
};
Expand Down Expand Up @@ -84,7 +82,6 @@ package com.playtomic.as3
var section:String = "TestAchievements.listWithPlayer";

var options:Object = {
publickey: "testpublickey",
playerid: "1",
filters: { rnd: rnd }
};
Expand All @@ -111,7 +108,6 @@ package com.playtomic.as3
var section:String = "TestAchievements.listWithPlayerAndFriends";

var options:Object = {
publickey: "testpublickey",
playerid: "1",
friendslist: ["2", "3"],
filters: { rnd: rnd }
Expand Down Expand Up @@ -145,7 +141,6 @@ package com.playtomic.as3
var section:String = "TestAchievements.stream";

var options:Object = {
publickey: "testpublickey",
filters: { rnd: rnd }
};

Expand Down Expand Up @@ -174,7 +169,6 @@ package com.playtomic.as3
var section:String = "TestAchievements.streamWithFriends";

var options:Object = {
publickey: "testpublickey",
group: true,
friendslist: ["2", "3"],
filters: { rnd: rnd }
Expand All @@ -200,7 +194,6 @@ package com.playtomic.as3
var section:String = "TestAchievements.streamWithPlayerAndFriends";

var options:Object = {
publickey: "testpublickey",
group: true,
playerid: "1",
friendslist: ["2", "3"],
Expand Down Expand Up @@ -230,7 +223,6 @@ package com.playtomic.as3
var section:String = "TestAchievements.save";

var achievement:Object = {
publickey: "testpublickey",
achievement: "Super Mega Achievement #1",
achievementkey: "secretkey",
playerid: rnd.toString(),
Expand Down

0 comments on commit c9c0299

Please sign in to comment.