Skip to content

Player V4

Michal Mikulec edited this page Aug 31, 2022 · 1 revision

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 %
  • xp int ⇒ XP Gained in the current level
  • total_xp int ⇒ Total XP gained
  • xp_to_level_up int ⇒ XP needed to level up
  • total_time_played int ⇒ In seconds
  • pvp_time_played int ⇒ In seconds
  • pve_time_played int ⇒ In seconds
  • ranks dict[int: dict[str: Rank | None]] ⇒ Ranked seasons data is stored here
  • casuals dict[int: dict[str: Rank | None]] ⇒ Casual seasons data is stored here
  • newcomers dict[int: dict[str: Rank | None]] ⇒ Newcomer seasons data is stored here
  • events dict[int: dict[str: Rank | None]] ⇒ Event seasons data is stored here
  • weapons WeaponsWeapons
  • trends TrendsTrends
  • operators OperatorsOperators
  • gamemodes Gamemodes ⇒ [Gamemodes][_Gamemodes]
  • maps MapsMaps

Methods

  • set_timespan_dates(start_date: str, end_date: str) -> None

    • Sets start & end dates for time constraining the data that gets returned by the API
  • load_playtime() -> None

    • Loads pvp_time_played, pve_time_played & total_time_played
  • load_progress() -> None

    • Loads alpha_pack, level, xp, total_xp & xp_to_level_up
  • load_skill_records(self, seasons: list[int] = None, boards: list[str] = None, regions: list[str] = None) -> None

    • Loads seasonal data for multiple seasons, gamemodes (boards) & regions at once
    • All values have defaults get the most data possible (You don't specify season => you get all of them)

    Valid region names are "emea", "ncsa", "apac" & "global"

    Valid board names are "pvp_ranked", "pvp_casual", "pvp_newcomer" & "pvp_warmup"

  • load_ranked(season: int = -1, region: str = "emea") -> Rank

    • Loads and returns the ranked Rank object for the specified region and season (-1 = latest season)
    • If the data for the selected season and region have already been loaded it just returns them

    Valid region names are "emea", "ncsa", "apac" & "global"

  • load_casual(season: int = -1, region: str = "emea") -> Rank

    • Loads and returns the casual Rank object for the specified region and season (-1 = latest season)
    • If the data for the selected season and region have already been loaded it just returns them

    Valid region names are "emea", "ncsa", "apac" & "global"

  • load_newcomer(season: int = -1, region: str = "emea") -> Rank

    • Loads and returns the newcomer Rank object for the specified region and season (-1 = latest season)
    • If the data for the selected season and region have already been loaded it just returns them

    Valid region names are "emea", "ncsa", "apac" & "global"

  • load_events(season: int = -1, region: str = "emea") -> Rank

    • Loads and returns the events Rank object for the specified region and season (-1 = latest season)
    • If the data for the selected season and region have already been loaded it just returns them

    Valid region names are "emea", "ncsa", "apac" & "global"

  • load_trends() -> Trends

    • Loads and returns Trends data
  • load_weapons() -> Weapons

  • load_operators() -> Operators

  • load_maps() -> Maps

    • Loads and returns Maps data