11import typing
22from abc import ABC , abstractmethod
33
4- if typing .TYPE_CHECKING :
5- from codingame .types import (
6- ClashOfCode ,
7- CodinGamerFromID ,
8- Follower ,
9- Following ,
10- PointsStatsFromHandle ,
11- )
4+ from ..types import (
5+ ClashOfCode ,
6+ CodinGamerFromID ,
7+ Follower ,
8+ Following ,
9+ PointsStatsFromHandle ,
10+ )
1211
1312__all__ = ("BaseHTTPClient" ,)
1413
@@ -66,25 +65,23 @@ def login(self, email: str, password: str):
6665 "CodinGamer" , "loginSite" , [email , password , True , "CODINGAME" , "" ]
6766 )
6867
69- def get_codingamer_from_handle (
70- self , handle : str
71- ) -> "PointsStatsFromHandle" :
68+ def get_codingamer_from_handle (self , handle : str ) -> PointsStatsFromHandle :
7269 return self .request (
7370 "CodinGamer" , "findCodingamePointsStatsByHandle" , [handle ]
7471 )
7572
76- def get_codingamer_from_id (self , id : int ) -> " CodinGamerFromID" :
73+ def get_codingamer_from_id (self , id : int ) -> CodinGamerFromID :
7774 return self .request (
7875 "CodinGamer" , "findCodinGamerPublicInformations" , [id ]
7976 )
8077
81- def get_codingamer_followers (self , id : int ) -> typing .List [" Follower" ]:
78+ def get_codingamer_followers (self , id : int ) -> typing .List [Follower ]:
8279 return self .request ("CodinGamer" , "findFollowers" , [id , id , None ])
8380
8481 def get_codingamer_follower_ids (self , id : int ) -> typing .List [int ]:
8582 return self .request ("CodinGamer" , "findFollowerIds" , [id ])
8683
87- def get_codingamer_following (self , id : int ) -> typing .List [" Following" ]:
84+ def get_codingamer_following (self , id : int ) -> typing .List [Following ]:
8885 return self .request ("CodinGamer" , "findFollowing" , [id , id ])
8986
9087 def get_codingamer_following_ids (self , id : int ) -> typing .List [int ]:
@@ -95,10 +92,10 @@ def get_codingamer_following_ids(self, id: int) -> typing.List[int]:
9592 def get_codingamer_clash_of_code_rank (self , id : int ) -> int :
9693 return self .request ("ClashOfCode" , "getClashRankByCodinGamerId" , [id ])
9794
98- def get_clash_of_code_from_handle (self , handle : str ) -> " ClashOfCode" :
95+ def get_clash_of_code_from_handle (self , handle : str ) -> ClashOfCode :
9996 return self .request ("ClashOfCode" , "findClashByHandle" , [handle ])
10097
101- def get_pending_clash_of_code (self ) -> " ClashOfCode" :
98+ def get_pending_clash_of_code (self ) -> ClashOfCode :
10299 return self .request ("ClashOfCode" , "findPendingClashes" )
103100
104101 # Notification
0 commit comments