psnawp_api.models.trophies.trophy_constants module#

Provides types for the data received by trophy endpoints.

class PlatformType(*values)[source]#

Bases: Enum

Represents the PlayStation platform associated with trophies.

This enum is used in API responses and requests to specify which PlayStation system a trophy belongs to. If an unrecognized value is provided, it defaults to PlatformType.UNKNOWN.

PS3 = 'PS3'#
PS4 = 'PS4'#
PS5 = 'PS5'#
PSPC = 'PSPC'#
PS_VITA = 'PSVITA'#
UNKNOWN = 'UNKNOWN'#
get_trophy_service_name() Literal['trophy', 'trophy2'][source]#

Gets the appropriate trophy service name based on the game platform type.

class TrophyRarity(*values)[source]#

Bases: Enum

Represents the rarity of a PlayStation trophy.

The rarity of a trophy is determined by how many users have earned it. Lower values indicate rarer trophies.

COMMON = 3#
RARE = 2#
ULTRA_RARE = 0#
VERY_RARE = 1#
class TrophySet(bronze: int = 0, silver: int = 0, gold: int = 0, platinum: int = 0)[source]#

Bases: object

Represents a collection of PlayStation trophies.

Used in API requests and responses to indicate the number of trophies of each type a game or player has earned.

__init__(bronze: int = 0, silver: int = 0, gold: int = 0, platinum: int = 0) None#
bronze: int = 0#
gold: int = 0#
platinum: int = 0#
silver: int = 0#
class TrophyType(*values)[source]#

Bases: Enum

Represents the type of a PlayStation trophy.

Trophies are awarded for in-game achievements and come in four types.

BRONZE = 'bronze'#
GOLD = 'gold'#
PLATINUM = 'platinum'#
SILVER = 'silver'#