Пример #1
0
    async def post(self, request, args):
        """ Clones match. """

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

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

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

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

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

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

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

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

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

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

        return responder.render(await request.state.league.details())
Пример #16
0
    async def post(self, request, args):
        """ Updates league details. """

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