-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Ahmed Castro edited this page Mar 9, 2016
·
22 revisions
A post method that stores a JSON data for each course section for each user. This data can be retrieved later using the get_progress method.
- Json user data to be stored
- Error array if any
$.post("/javascript_api/save_progress",{progress{"player1_wins":game.player1_wins,"player2_wins":game.player2_wins},
function(data)
{
console.log(data["error"])
})
A get method that retrieves the data previously stored by the save_progress function. The data is stored in the JSON format.
###Parameters
None
###Returns
-
Json progress previously stored
-
Error array if any
$.get("/javascript_api/get_progress",
function(data)
{
game.player1_wins=data["player1_wins"]
game.player2_wins=data["player2_wins"]
})
post method
###Parameters
- Achievement id
###Returns
- Error array if any
get method
###Parameters
- user id
###Returns
-
Achievment list
-
Error array if any
###Example