-
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 #30 from 201st-Luka/new-features
New features
- Loading branch information
Showing
41 changed files
with
458 additions
and
164 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from asyncio import get_running_loop, run | ||
|
||
from .abc import RequestModel | ||
from ..models import ClanWarLeagueGroup | ||
|
||
|
||
class ClanCurrentwarLeaguegroupRequest(RequestModel, ClanWarLeagueGroup): | ||
""" | ||
Retrieve information about clan's current clan war league group | ||
""" | ||
clan_tag = None | ||
|
||
def __init__(self, clan_tag): | ||
""" | ||
initialisation of the clan currentwar leaguegroup request | ||
:param clan_tag: Tag of the clan. | ||
:type clan_tag: str | ||
""" | ||
|
||
self.clan_tag = clan_tag | ||
RequestModel.__init__(self, | ||
"clans/{clan_tag}/currentwar/leaguegroup", | ||
clan_tag=self.clan_tag) | ||
ClanWarLeagueGroup.__init__(self, None) | ||
self._main_attribute = self.clan_tag | ||
return | ||
|
||
@classmethod | ||
async def from_base_clan(cls, base_clan): | ||
""" | ||
method that returns the clan object of a BaseClan or a BaseClan subclass model | ||
:param base_clan: The BaseClan or a BaseClan subclass model | ||
:type base_clan: BaseClan | ||
:return: returns a ClanRequest object | ||
:rtype: ClanRequest | ||
""" | ||
self = await cls(base_clan.tag).request() | ||
return self | ||
|
||
|
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,14 @@ | ||
from .abc import RequestModel | ||
from ..models import ClanWarLeagueGroup, BaseClan | ||
|
||
|
||
class ClanCurrentwarLeaguegroupRequest(RequestModel, ClanWarLeagueGroup): | ||
clan_tag: str = None | ||
|
||
def __init__(self, clan_tag: str) -> None: | ||
self.clan_tag = clan_tag | ||
... | ||
|
||
@classmethod | ||
async def from_base_clan(cls, base_clan: BaseClan) -> ClanCurrentwarLeaguegroupRequest: | ||
... |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from .abc import RequestModel | ||
from ..models import ClanWarLeagueGroup | ||
|
||
|
||
class ClanWarleaguesWarsRequest(RequestModel, ClanWarLeagueGroup): | ||
""" | ||
Retrieve information about individual clan war league war | ||
""" | ||
|
||
def __init__(self, war_tag): | ||
self.war_tag = war_tag | ||
super().__init__("clanwarleagues/wars/{war_tag}", | ||
war_tag=self.war_tag) | ||
self._main_attribute = self.war_tag | ||
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,13 @@ | ||
from .abc import RequestModel | ||
from ..models import ClanWarLeagueGroup | ||
|
||
|
||
class ClanWarleaguesWarsRequest(RequestModel, ClanWarLeagueGroup): | ||
""" | ||
Retrieve information about individual clan war league war | ||
""" | ||
|
||
def __init__(self, war_tag) -> None: | ||
self.war_tag: str = ... | ||
self._main_attribute: str = ... | ||
... |
Oops, something went wrong.