Welcome to aiopixel’s documentation!¶
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
Models¶
aiopixel Models¶
Boosters¶
Friends¶
Guilds¶
-
class
aiopixel.models.guilds.
Guild
(_id: str, created: int, exp: int, discord: str, joinable: bool, description: str, members: typing.List[aiopixel.models.guilds.GuildMember], name: str, tag: aiopixel.models.guilds.GuildTag, vip_count: int, mvp_count: int, ranks: typing.List[aiopixel.models.guilds.GuildRank], preferred_games: typing.List[aiopixel.gametypes.GameType], chat_throttle: int, is_listed: bool, chat_muted_until: datetime.datetime)[source]¶ A guild
Leaderboards¶
Players¶
-
class
aiopixel.models.players.
PlayerAchievements
(data, all_achievements: aiopixel.models.players.PixelAchievements)[source]¶
-
class
aiopixel.models.players.
PlayerRank
(pretty_name: str)[source]¶ An enum representing player ranks
-
ADMIN
= 'Admin'¶
-
BUILD_TEAM
= 'Build Team'¶
-
HELPER
= 'Helper'¶
-
JR_HELPER
= 'Jr. Helper'¶
-
MODERATOR
= 'Moderator'¶
-
MVP
= 'MVP'¶
-
MVP_PLUS
= 'MVP+'¶
-
NONE
= ''¶
-
SUPERSTAR
= 'MVP++'¶
-
VIP
= 'VIP'¶
-
VIP_PLUS
= 'VIP+'¶
-
YOUTUBER
= 'Youtuber'¶
-
-
class
aiopixel.models.players.
Player
(_id: str, displayname: str, first_login: int, last_login: int, karma: int, network_exp: float, rank: aiopixel.models.players.PlayerRank, last_logout: int, achievements: aiopixel.models.players.PlayerAchievements, stats: list, most_recent_game_type: aiopixel.gametypes.GameType)[source]¶