Skip to content

Player V2

Michal Mikulec edited this page Feb 17, 2022 · 4 revisions

class siegeapi.Player()

Attributes

  • id str โ‡’ Ubi user ID
  • profile_pic_url_146 str โ‡’ 146px ร— 146px profile pic URL
  • profile_pic_url_256 str โ‡’ 256px ร— 256px profile pic URL
  • profile_pic_url_500 str โ‡’ 500px ร— 500px profile pic URL
  • profile_pic_url str โ‡’ Alias for profile_pic_256
  • name str โ‡’ Players' current Ubisoft username
  • level int โ‡’ Current level
  • alpha_pack int โ‡’ Current alpha pack %
  • deaths int
  • penetration_kills int
  • matches_won int
  • bullets_hit int
  • melee_kills int
  • matches_played int
  • kill_assists int
  • time_played int โ‡’ In seconds
  • pvp_time_played int โ‡’ In seconds
  • pve_time_played int โ‡’ In seconds
  • revives int
  • kills int
  • headshots int
  • matches_lost int
  • dbno_assists int
  • suicides int
  • barricades_deployed int
  • reinforcements_deployed int
  • total_xp int โ‡’ For some users doesn't quite add up
  • rappel_breaches int
  • distance_travelled int โ‡’ Could be overflown...
  • revives_denied int
  • dbnos int โ‡’ Down But Not Out
  • gadgets_destroyed int
  • blind_kills int
  • ranks dict โ‡’ Ranked seasons data is stored here
  • casuals dict โ‡’ Casual seasons data is stored here
  • operators dict โ‡’ Total operator stats
  • weapon_types list[WeaponType] โ‡’ Weapon Type stats (WeaponType)
  • weapons Weapons โ‡’ Weapons
  • casual Gamemode โ‡’ Lifetime casual stats (Gamemode)
  • ranked Gamemode โ‡’ Lifetime ranked stats (Gamemode)
  • thunt Gamemode โ‡’ Lifetime thunt stats (Gamemode)
  • trends Trends โ‡’ Lifetime thunt stats (Trends)

Methods

  • load_weapons() -> Weapons

    • Loads stats for individual weapons
  • is_currently_online(self) -> dict[str: bool | str]

    • Checks if the user is currently online and in Siege
  • load_general() -> None

    Loads these general stats
    Stat Stat
    .deaths .kills
    .kill_assists .penetration_kills
    .matches_won .bullets_hit
    .melee_kills .matches_played
    .revives .headshots
    .matches_lost .dbno_assists
    .suicides .barricades_deployed
    .reinforcements_deployed .total_xp
    .rappel_breaches .distance_travelled
    .revives_denied .dbnos
    .gadgets_destroyed .blind_kills
  • load_trends(block_duration: TrendBlockDuration = TrendBlockDuration.WEEKLY) -> Trends

    • Loads Trend data to Player.trends and returns said data
    • TrendBlockDuration can be one of the following .DAILY / .WEEKLY / .MONTHLY
  • load_level() -> int

    • Loads the users level to Player.level and returns it
  • load_level() -> (int, int, int)

    • Loads the users playtimes to Player.pvp_time_played, Player.pve_time_played & Player.time_played
    • Returns the data in the following order: pvp_time_played, pve_time_played, time_played
  • load_alpha_pack() -> int

    • Loads and returns Player.alpha_pack
    • 550 ๐Ÿ‘‰ 5.5%
    • 6900 ๐Ÿ‘‰ 69%
  • load_casual(region='emea', season=-1, data=None) -> Rank

    • Loads and returns the casual Rank object for the specified region and season (-1 = latest season)

    Valid region names are emea, ncsa & apac

  • load_rank(region='emea', season=-1, data=None) -> Rank

    • Loads and returns the ranked Rank object for the specified region and season (-1 = latest season)

    Valid region names are emea, ncsa & apac

  • load_gamemodes() -> (Gamemode, Gamemode, Gamemode)

    • Loads ranked, casual and thunt Gamemode objects
    • Returns ranked, casual, thunt
  • load_weapon_types(data=None) -> list[WeaponType]

    • Loads and returns WeaponType stats into Player.weapon_types
  • load_operators() -> dict[str: Operator]

    • Loads and returns all time Operator stats dict