cvan/galaxy-api — pull request #52 by soedar (2014-02-03 16:22:16+00:00)
Title: Leaderboard endpoints

Most of the work that I've done here is to retrieve the scores for individual leaderboards of a game, which is the `GET /api/v1/game//board/` endpoint. For now, the `GET /api/v1/game//board` does not include the default output of the specific endpoint. (Only shows the name and the slug)

For the `GET /api/v1/game//board/` endpoint:

**Optional Parameters**
`sort`: `asc` or `desc` (default: `desc`)
`friendsOnly`: `true` or `false` (default: `false`)
`_user`: user's ssa token. Required when `friendsOnly` is true. The code will checks the token when this parameter is specified, no matter `friendsOnly` is true or false

**Sample Output**
```javascript
[
{
"user": {
"avatar": "http://www.gravatar.com/avatar/52ee5da3a600790b01386b551ec2e36a",
"username": "1234",
"id": "1234"
},
"score": "200"
},
{
"user": {
"avatar": "http://www.gravatar.com/avatar/8c5a1bf958ec4bbdfafc8a2fb4614b75",
"username": "soedar.sg",
"id": "b27911cf-7fe7-4c95-80e8-0db204e571cf"
},
"score": "10"
}
]
```