aiopixel Documentation¶
-
class
aiopixel.
PixelClient
(api_key: str)[source]¶ Asynchronus client for accessing Hypixel’s API
-
coroutine
boosters
() → typing.List[aiopixel.models.boosters.Booster][source]¶ Get a list of all boosters
Returns: A list of all boosters in the queue
Return type: list of Booster
Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response json
-
coroutine
find_guild_by_name
(name: str) → str[source]¶ Get the guild id for a guild with the specified name
Parameters: name (str) – The guild name
Returns: The guild id
Return type: str
Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response jsonGuildNotFound
– If no guild is found
-
coroutine
find_guild_by_uuid
(uuid: str) → str[source]¶ Get the guild id for the specified player’s guild
Parameters: uuid (str) – The player’s uuid
Returns: The guild id
Return type: str
Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response jsonPlayerNotInGuild
– If no guild is found
-
coroutine
friends
(uuid: str) → typing.List[aiopixel.models.friends.Friend][source]¶ Get friends of a player
Parameters: uuid (str) – The uuid of the player to get friends of
Returns: A list of objects representing the player’s friendships
Return type: list of Friend
Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or if an error is returned in the response json
-
coroutine
guild
(guild_id: str) → aiopixel.models.guilds.Guild[source]¶ Get a guild
Parameters: guild_id (str) – The id of the guild to look up
Returns: The requested guild
Return type: Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response jsonGuildNotFound
– If no guild is found
-
coroutine
leaderboards
() → typing.List[aiopixel.models.leaderboards.Leaderboard][source]¶ Get all leaderboards
Returns: A list of all leaderboards
Return type: list of Leaderboard
Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response json
-
coroutine
player_from_name
(name: str) → aiopixel.models.players.Player[source]¶ Gets the player represented by the specified name
Parameters: name (str) – The name of the player
Returns: The specified player
Return type: Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response jsonPlayerNotFound
– If the player doesn’t exist or has never logged into the server
-
coroutine
player_from_uuid
(uuid: str) → aiopixel.models.players.Player[source]¶ Gets the player represented by the specified uuid
Parameters: uuid (str) – The uuid of the player
Returns: The specified player
Return type: Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response jsonPlayerNotFound
– If the player doesn’t exist or has never logged into the server
-
coroutine
status
(uuid: str) → aiopixel.models.sessions.PlayerStatus[source]¶ Get a player’s current status
Parameters: uuid (str) – The player to get the status of
Returns: The player’s current status
Return type: PlayerStatus
Raises: InvalidKeyException
– If the client’s API key is not validPixelException
– If an error occurs while making the request or is present in the response jsonNoStatusForPlayer
– If the specified player is offline or has this endpoint disabled via in-game settings
-
coroutine