AchievementList
ClassDataClassSource
AchievementList(
achievements: list[Achievement] = [], steam_appid: int, lang: str = "english"
)
The list of achievements.
Fields
| Name | Type | Required | |
|---|---|---|---|
achievements | list[Achievement] | The list of detected achievements. | |
steam_appid | int | The app ID. It specifies the game where the achievements belong. | |
lang | str | The language of the parsed achievments. |
Methods
add_extra_info
v_1: Self = self.add_extra_info(user_profile: str)
Add extra information to this achievement list.
Requires
| Name | Type | Required | |
|---|---|---|---|
user_profile | str | The profile name used to compensate the current list. This name needs to be strictly configured as the name in the following link: https://steamcommunity.com/id/{name}/ |
Returns
| Name | Type | |
|---|---|---|
v_1 | Self | The updated list. Note that the changes are inplace. |
from_app
v_1: Self = AchievementList.from_app(
app: int | AppQuerySimple,
lang: str = "english",
extra_user_profiles: Sequence[str] | None = None,
)
Detect the achievements from a Steam game.
Requires
| Name | Type | Required | |
|---|---|---|---|
app | int | AppQuerySimple | The steam app ID or the query object. It is used for locating the game achievement page. | |
lang | str | The language used for accessing the achievement profile. | |
extra_user_profiles | Sequence[str] | None | A list of extra Steam user profile names. If provided, will attempt to parse more achievement information from the given profiles. Ideally, a profile with all achievements unlocked and another profile with all achievements locked will yield the full information. |
Returns
| Name | Type | |
|---|---|---|
v_1 | Self | The achievement list detected from the app. |
get_icon_names
v_1: list[AchievementIconName] = self.get_icon_names()
Get the list of achievement icon names.
Returns
| Name | Type | |
|---|---|---|
v_1 | list[AchievementIconName] | The list of achievement icon names. These names will be used by self.save_icons(...). |
save_icons
v_1: list[AchievementIconName] = self.save_icons(out_dir: str | PathLike[str])
Save the acheivement icons in a folder.
Requires
| Name | Type | Required | |
|---|---|---|---|
out_dir | str | PathLike[str] | The path to the directory where the icons will be savd. |
Returns
| Name | Type | |
|---|---|---|
v_1 | list[AchievementIconName] | The list of saved achievement icon names. It provides a mapping from an achievement to the saved file name. |
Properties
names
names: list[str] = self.names
A mapping from all achievement names to their indicies.