Example #1
0
    async def post(self, request, args):
        """ Clones match. """

        return responder.render(await
                                request.state.league.match(**args).clone())
Example #2
0
    async def get(self, request, args):
        """ Gets base details of match. """

        return responder.render(await request.state.league.match(**args).get())
Example #3
0
    async def get(self, request, args):
        """ Gets scoreboard of match. """

        return responder.render(await
                                request.state.league.match(**args
                                                           ).scoreboard())
Example #4
0
    async def post(self, request, args):
        """ Creates match. """

        return responder.render(await
                                request.state.league.match().create(**args))
Example #5
0
    async def delete(self, request, args):
        """ Deletes match. """

        return responder.render(await request.state.league.match(**args).end())
Example #6
0
 async def arg_expection(request, exc):
     return responder.render(
         response(error=exc.messages, status=exc.status_code))
Example #7
0
    def unauthorized(self):
        """ Handles unauthorized requests """

        return responder.render(
            response(error="Unauthorized", status=401)
        )
Example #8
0
    async def get(self, request, args):
        """ Gets list of matches. """

        return responder.render(
            await request.state.league.list(**args).matches()
        )
Example #9
0
 async def http_exception(request, exc):
     return responder.render(
         response(error=exc.detail, status=exc.status_code))
Example #10
0
    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"]))
Example #11
0
    async def get(self, request, args):
        """ List players. """

        return responder.render(
            await request.state.league.list(**args).players()
        )
Example #12
0
 async def post(self, request, args):
     return responder.render(await
                             request.state.league.players(**args
                                                          ).validate())
Example #13
0
    async def patch(self, request, args):
        """ Reset user. """

        return responder.render(await
                                request.state.league.player(**args).reset())
Example #14
0
    async def delete(self, request, args):
        """ Delete user. """

        return responder.render(await
                                request.state.league.player(**args).delete())
Example #15
0
    async def get(self, request):
        """ Pulls details of map. """

        return responder.render(await request.state.league.details())
Example #16
0
    async def post(self, request, args):
        """ Updates league details. """

        return responder.render(await request.state.league.update(**args))