-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from 201st-Luka/new-features
New features
- Loading branch information
Showing
31 changed files
with
709 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ class Season: | |
@classmethod | ||
def from_str(cls, season: str): | ||
... | ||
|
||
def to_str(self) -> str: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from .abc import IterRequestModel | ||
from ..models import ClanCapitalRanking, ClanCapitalRankingList, Location | ||
|
||
|
||
class CapitalRankingsRequest(IterRequestModel): | ||
_iter_rtype = ClanCapitalRanking | ||
_list_rtype = ClanCapitalRankingList | ||
|
||
def __init__(self, location_id, limit=None, after=None, before=None): | ||
self.location_id = (location_id.id if isinstance(location_id, Location) | ||
else location_id) | ||
super().__init__("locations/{location_id}/rankings/capitals", | ||
location_id=self.location_id, | ||
kwargs={ | ||
'limit': limit, | ||
'after': after, | ||
'before': before | ||
}) | ||
return | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from typing import Iterator | ||
|
||
from .abc import IterRequestModel | ||
from ..models import ClanCapitalRanking, ClanCapitalRankingList, Location | ||
|
||
|
||
class CapitalRankingsRequest(IterRequestModel): | ||
_iter_rtype = ClanCapitalRanking | ||
_list_rtype = ClanCapitalRankingList | ||
|
||
def __init__(self, location_id: int | Location, | ||
limit: int = None, after: str = None, before: str = None): | ||
self.location_id: int = ... | ||
... | ||
|
||
@property | ||
def items(self) -> _list_rtype: | ||
... | ||
|
||
def __getitem__(self, item: int) -> _iter_rtype: | ||
... | ||
|
||
def __iter__(self) -> Iterator[_iter_rtype]: | ||
... | ||
|
||
def __next__(self) -> _iter_rtype: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from .abc import IterRequestModel | ||
from ..models import LeagueSeason, LeagueSeasonList | ||
|
||
|
||
class LeagueSeasonsRequest(IterRequestModel): | ||
_iter_rtype = LeagueSeason | ||
_list_rtype = LeagueSeasonList | ||
|
||
def __init__(self, league_id): | ||
super().__init__("leagues/{league_id}/seasons", | ||
league_id=league_id) | ||
return |
Oops, something went wrong.