Ejemplo n.º 1
0
    async def post(self, request, args):
        """ Clones match. """

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

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

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

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

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

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

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

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

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

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

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

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