This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local gameSparkKey = "<myKey>" | |
local gameSparkSecret = "<mySecret>" | |
local gameSparkPropertyName = "pageServerVersions" | |
local json = require( "json" ) | |
local gs = require("plugin.gamesparks") | |
local G = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"gs.setLogger":{ | |
"body": "gs.setLogger( ${1:listener} )", | |
"description": "Set Gamesparks logging listener.", | |
"prefix": "gs.setLogger" | |
}, | |
"gs.setApiKey":{ | |
"body": "gs.setApiKey( ${1:key} )", | |
"description": "Set Gamespark key.", | |
"prefix": "gs.setApiKey" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//URL | |
/* | |
https://preview.gamesparks.net/callback/<gameAPIKey>/postScore/<credentialSecret>? | |
score=<playerScore> -- Needs to always be called score but it could represent anything. Whatever is being counted by the event. | |
&password=<playerPassword> | |
&username=<playerUsername> | |
&eventname=<leaderboardEventName> -- The name of the event that is attached to the leaderboard. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//url: | |
/* | |
https://preview.gamesparks.net/callback/<appKey>/retrieveLeaderboard/<credentialSecret>? | |
aroundme=true& -- Return scores above and below current user. Omit if you want the top of the leaderboard. | |
leaderboardname=<shotnameofleaderboard>& -- Name of the leaderboard. | |
entrycount=<number of entries>& -- How many entries to return. If aroundMe is included in the call this number will be the records returned above and below the user otherwise this will be the total number of records. | |
username=<player user name>& -- Username of player. | |
password=<player password> -- Password of player. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get url: https://preview.gamesparks.net/callback/<apiKey>/savePlayerTable/<credential secret>?username=<username>&password=<user password>&tablename=<table name> | |
//Save url: https://preview.gamesparks.net/callback/<apiKey>/getPlayerTable/<credential secret>?username=<username>&password=<user password>&tablename=<table name> | |
//Get Code | |
var uPwd = Spark.getData().password; | |
var uName = Spark.getData().username; | |
var uTableName = Spark.getData().tablename; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Login URL: | |
//https://preview.gamesparks.net/callback/<yourAPIKey>/userLogin/<yourCredentialSecret>?username=<username>&password=<password> | |
//Register URL: | |
//https://preview.gamesparks.net/callback/<yourAPIKey>/register/<yourCredentialSecret>?username=<username>&password=<password>&displayName=<displayName> | |
//The login code: | |
var uPwd = Spark.getData().password; |
NewerOlder