Api Reference¶
Apex Api¶
-
class
apexpy.api.
ApexApi
(key: str = None)¶ Represents the Apex api containing all the data requested by
ApexRequest
.Parameters: key ( str
) – The apex legends api key.-
legends
¶ List[
ApexCharacter
] Legends’ data
-
_populate
(data) → None¶ Populates object with data
Parameters: data – Returns: None
-
search
(name: str, platform: str) → None¶ Creates the
ApexRequest
object that takes care of the api’s communication. Automatically sets variables and call the population method.Parameters: Returns: None
-
Apex Character¶
-
class
apexpy.characters.
ApexCharacter
(data)¶ Represents an Apex legend character
Parameters: data ( dict
) – Every characters data.
Apex request¶
-
class
apexpy.httprequest.
ApexRequest
(name: str, platform: int, api_key: str = None)¶ Represents the asynchronous http call made to the apex legends api
Parameters: -
platform
¶
-
name
¶
-
api_key
¶
-
session
() → <sphinx.ext.autodoc.importer._MockObject object at 0x7f3a5639ed68>¶ Makes the api call. :return:
aiohttp.client.ClientResponse
-
Exceptions¶
-
class
apexpy.exceptions.
CustomBaseException
(message='')¶ Base exception, exceptions are raised depending on the received code from the api.
API_ERROR_MAP = { 401: UnauthorizedError, 400: NotFoundError, 403: UnauthorizedError, 404: PlayerNotFoundError, 500: ServerError}
-
class
apexpy.exceptions.
ApiKeyNotProvidedError
(message='')¶ Raised when the api key is not directly provided and doesn’t exist in os.environ
-
class
apexpy.exceptions.
NotFoundError
(message='')¶
-
class
apexpy.exceptions.
ServerError
(message='')¶