async def post(self, request, args): """ Clones match. """ return responder.render(await request.state.league.match(**args).clone())
async def get(self, request, args): """ Gets base details of match. """ return responder.render(await request.state.league.match(**args).get())
async def get(self, request, args): """ Gets scoreboard of match. """ return responder.render(await request.state.league.match(**args ).scoreboard())
async def post(self, request, args): """ Creates match. """ return responder.render(await request.state.league.match().create(**args))
async def delete(self, request, args): """ Deletes match. """ return responder.render(await request.state.league.match(**args).end())
async def arg_expection(request, exc): return responder.render( response(error=exc.messages, status=exc.status_code))
def unauthorized(self): """ Handles unauthorized requests """ return responder.render( response(error="Unauthorized", status=401) )
async def get(self, request, args): """ Gets list of matches. """ return responder.render( await request.state.league.list(**args).matches() )
async def http_exception(request, exc): return responder.render( response(error=exc.detail, status=exc.status_code))
async def get(self, request, args): """ List info about given players. """ return responder.render(await request.state.league.players( user_ids=args["user_ids"] ).fetch(include_stats=args["include_stats"]))
async def get(self, request, args): """ List players. """ return responder.render( await request.state.league.list(**args).players() )
async def post(self, request, args): return responder.render(await request.state.league.players(**args ).validate())
async def patch(self, request, args): """ Reset user. """ return responder.render(await request.state.league.player(**args).reset())
async def delete(self, request, args): """ Delete user. """ return responder.render(await request.state.league.player(**args).delete())
async def get(self, request): """ Pulls details of map. """ return responder.render(await request.state.league.details())
async def post(self, request, args): """ Updates league details. """ return responder.render(await request.state.league.update(**args))