hypixelaPY.Hypixel(api)
:
api: str
- the provided api keyplayer: Player
- wrapper on the player method of the Hypixel APIleaderboards: Leaderboards
- wrapper on the leaderboards method of the Hypixel API
Player
:
get(uuid: str=uuid, name: str=name, query: str=query) -> HypixelPlayer
- gets a player from the API- this prioritizes
uuid
, thenname
, thenquery
- only one input is required for a valid result
- this prioritizes
hypixel = await hypixelaPY.Hypixel(API_KEY)
player = await hypixel.player.get(uuid=uuid) # will use uuid
player = await hypixel.player.get(name=name) # will use name
player = await hypixel.player.get(uuid=uuid, name=name) # will use uuid
player = await hypixel.player.get(query=query) # will use query
player = await hypixel.player.get(uuid=uuid, name=name, query=query) # will use uuid
player = await hypixel.player.get(name=name, input=query) # will use name
HypixelPlayer
:
str(x)
- returns the name of the playername: str
- the name of the playeruuid: str
- the UUId of the playerkarma: int
- the player's karmaachievement_points: int
- the player's achievement pointsrank: Rank
- the rank data of the playerlevel: Level
- the network level data of the playerlogins: Logins
- the login times of the playersocial: Social
- the social media links/names of the playerbedwars: Bedwars
- the Bedwars stats of the playerskywars: Skywars
- the Skywars stats of the playerduels: Duels
- the Duels stats of the player
Rank
:
str(x)
- returns the rank namebool(x)
- checks whether a rank existsname: str, None
- the rank namecolor: int
- the color as a hexadecimal int
Level
:
exact: float
- the exact network level of the playerlevel: int
- the network level of the playernext: int
- the next network level of the playerpercentage: float
- the percentage of the way the player is tonext
Logins
:
first: datetime.datetime
- the first login of the playerlast: datetime.datetime
- the most recent login of the player
Social
:
any attribute in this class could be None
twitter: str
- the Twitter link of the playeryoutube: str
- the YouTube link of the playerinstagram: str
- the Instagram link of the playertwitch: str
- the Twitch link of the playerdiscord: str
- the Discord name or link of the playerhypixel_forums: str
- the Hypixel Forums link of the player
Any stat class like WinsLosses
or FinalKillsDeaths
have the following attributes:
kills/wins
- the name of the positive stat
deaths/losses
- the name of the negative stat
ratio: Ratio
- the ratio of positive to negative stats
Ratio
:
positive_stat: int
- the numerator of the rationegative_stat: int
- the denominator of the ratioratio: float
- the ratio rounded to two decimal pointsnext:
- the ratio increased by one exactlyincrease(amount=0)
- calculates how many more ofpositive_stat
is required to increase the ratio byincrease
( default increase will go to next integer)
These classes all have the following stat attributes (excluding prestige
, coins
, solo
, doubles
, etc):
Solo
Doubles
Threes
Fours
FourVFour
Castle
- the dreams ones
Bedwars
:
prestige: Prestige
- the star level and prestige of the playercoins: int
- the Bedwars coins of the playergames_played: int
- the amount of Bedwars games the player has playedbeds: BedsBrokenLost
- the amount of beds the player has broken and lostkills: KillsDeaths
- the amount of kills and deaths the player hasfinals: FinalKillsDeaths
- the amount of final kills and final deaths the player haswins: WinsLosses
- the amount of games the player has won and lostwinstreak: int
- the overall Bedwars winstreak of the playersolo: Solo
- the solo Bedwars stats of the playerdoubles: Doubles
- the doubles Bedwars stats of the playerthrees: Threes
- the solo Bedwars stats of the playerfours: Fours
- the solo Bedwars stats of the playerfour_v_four: FourVFour
- the 4v4 Bedwars stats of the playerdreams: Dreams
- the dreams Bedwars stats of the player
Dreams
: All of these classes other than castle have attributes of solo
or double
depending on what modes exist.
These will have the same attributes as the Solo
and Doubles
objects listed above
armed
castle
lucky
rush
ultimate
voidless
hypixel = await hypixelaPY.Hypixel(API_KEY)
player = await hypixel.player.get(uuid=uuid)
print(player.bedwars.prestige.star)
print(player.bedwars.games_played)
print(player.bedwars.solo.games_played)
print(player.bedwars.dreams.armed.doubles.games_played)