Skip to content

Instantly share code, notes, and snippets.

@gregsabo
Last active December 17, 2015 17:39
Show Gist options
  • Save gregsabo/5647482 to your computer and use it in GitHub Desktop.
Save gregsabo/5647482 to your computer and use it in GitHub Desktop.
Documentation on how to use the Prom Achievements Server.

The base URL for the API is:

http://msspm-achievements.appspot.com/

Rankings

A JSON listing of user rankings can be found here:

http://msspm-achievements.appspot.com/rankings

The result is sorted by descending score and will look something like this:

[
  {
    score: 10,
    name: "Greg Sabo",
    email: "gregsabo@gmail.com"
  }, {
    score: 9,
    name: "Fakey McGee",
    email: "fakeymcgee@example.com"
  }
]

Note that a Prom Chaperone may reassign achievement point values at any time.

Granting Achievements

Assuming the user linked to your app via the Prom server, this should work:

APP_CODE = "YOUR_APP_CODE"
log_achievement_one = ->
    url = "http://msspm-achievements.appspot.com/grant#{window.location.search}&app_code=#{APP_CODE}"
    $.get(url).done( ->
        console.log("achievement success")
    ).fail( ->
        console.log("achievement failure")
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment