Skip to content

The statsService is responsible for keeping track of numeric stats of games

License

Notifications You must be signed in to change notification settings

Exorath/StatsService

Repository files navigation

StatsService

The statsService is responsible for keeping track of numeric stats of games

Endpoints

/games/{gameId}/player/{uuid}/stat/{statId}?since=1496675655742 [GET] - Get an agregated stat response

Response

{
"amount": 215
}

/games/{gameId}/player/{uuid}/stat/{statId} [POST] - Add a stat entry

This will automatically be logged at the current time of the receiving service.

Request

{
"amount": 5
}

Response

{
"Success": true
}

Environment

Name Value
MONGO_URI {mongo_uri}
DB_NAME {db name to store data}

/games/{gameId}/stat/{statId}/top/weekly?amount=2 [GET] - Get an agregated stat response

Response

{
"topPlayers": [
{
  "uuid": "asd",
  "amount": 12
},{
  "uuid": "asde",
  "amount": 8
}
]
}

About

The statsService is responsible for keeping track of numeric stats of games

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages