this is mostly just a refactoring of my previous attempt at creating this service, as it makes use of a different file structure and packages
- Migrate to time.Time for
History.MatchDateandChallenge.ResolutionDate, Then adjust contest resolution functions to make use of the new types
/auth/login GETredirects to bnet oauth login screen/auth/bnet_oauth_cbparses information returned bnet and awards a jwt token if successful/auth/user GETreturns player information of current user
requires admin permissions
/player/{id}/add-admin PUTreturns a player of a given ID with raised permissions assuming the caller has the ability to do so/player/{id}/remove-admin PUTreturns a player of a given ID with demoted permissions assuming the caller has the ability to do so/player/{id}/promote/{rank} PUTreturns a list of players affected by the change of promoting a player of a given ID and Rank/player/{id}/replace/{rank} PUTreturns a list of players affected by the change of changing a player's rank to given rank, even if it displaces the former holder of said rank/player/{id}/register PUTreturns a player of a given ID with a populated ranking for settle the beef/player/{id}/unregister PUTreturns a list of players affected by the change of removing given player from the rankings
does not require admin privelidges
/player GETreturns a list all the players/player/rankings GETreturns a list all the players involved in "Settle the Beef"/player/register PUTreturns a player of a given ID with a populated ranking for settle the beef/player/unregister PUTreturns a list of players affected by the change of removing player from rankings/player/{id} GETreturns a player with the given ID/player/{id}/challenges GETreturns a list of challenges related to a player of a given ID (both as challenger and challenged)/player/{id}/history GETreturns a list of matches related to a player of a given ID
requires admin permissions
-
/challenge/{id}/adjudicatereturns a challenge that has been mutated by admin decision about the winner of the challenge -
/challenge GETreturns a list of all challenges -
/challenge/unresolved GETreturns a list of all challeges that have yet to resolve -
/challenge POSTreturns a new challenge after saving it to DB -
/challenge/{id} PUTreturns a challenge of a given ID after updating some information, limit params that can be set -
/challenge/{id} DELETEreturns a success message after soft deleting a challenge -
/history/{id} GETreturns record of a match given an ID
This is basically an endpoint for scheduled jobs only. Updating player profile information, match history, adjudicating challenges
/cron