Source code for clash_royale.aio.resources.global_tournaments

from __future__ import annotations

from typing_extensions import Unpack

from ...models.global_tournament import GlobalTournament
from ...types import PaginationParams
from ..pagination import PaginatedList
from .resource import Resource


[docs] class GlobalTournaments(Resource): """ Async resource for global tournament related endpoints. Check the :clash-royale-api:`globaltournaments` for more detailed information about each endpoint. """
[docs] def list( self, **params: Unpack[PaginationParams] ) -> PaginatedList[GlobalTournament]: """Get list of global tournaments.""" return PaginatedList( client=self._client, endpoint="/globaltournaments", model=GlobalTournament, params=params, # ty:ignore[invalid-argument-type] )