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

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

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

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

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

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

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

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

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

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

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

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

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