psnawp_api.models.game_entitlements module#

Provides endpoint to fetch the info from Game Entitlements info for client.

class ConceptMeta[source]#

Bases: TypedDict

Metadata about the game concept.

conceptId: str#
iconUrl: str#
minimumAge: int#
name: str#
class EntitlementAttribute[source]#

Bases: TypedDict

Represents an entitlement attribute for a game entitlement.

entitlementKeyFlag: bool#
placeholderFlag: bool#
platformId: str#
class GameEntitlement[source]#

Bases: TypedDict

Represents a single game entitlement entry.

activeDate: str#
activeFlag: bool#
conceptMeta: ConceptMeta#
consumedCount: int#
entitlementAttributes: list[EntitlementAttribute]#
entitlementType: int#
featureType: int#
gameMeta: GameMeta#
id: str#
isBeta: NotRequired[bool]#
isConsumable: bool#
isGame: NotRequired[bool]#
isSubscription: bool#
preorderFlag: bool#
preorderPlaceholderFlag: bool#
productId: str#
remainingCount: int#
revisionId: int#
rewardMeta: RewardMeta#
serviceType: NotRequired[int]#
skuId: str#
titleMeta: TitleMeta#
class GameEntitlementsIterator(authenticator: Authenticator, url: str, pagination_args: PaginationArguments, title_ids: str)[source]#

Bases: PaginationIterator[GameEntitlement]

An iterator for retrieving the authenticated user’s game entitlements (owned games) from the PlayStation Network.

Note

This class retrieves only PS4 and PS5 game entitlements, as the underlying API endpoints accessed via the PlayStation Android app are limited to these platforms.

Variables:
  • authenticator (Authenticator) – An instance of Authenticator used to authenticate and make HTTPS requests.

  • title_ids (str) – Comma-separated string of title IDs to filter and check if the client owns any of the specified titles.

Init for GameEntitlementsIterator.

__init__(authenticator: Authenticator, url: str, pagination_args: PaginationArguments, title_ids: str) None[source]#

Init for GameEntitlementsIterator.

fetch_next_page() Generator[GameEntitlement, None, None][source]#

Fetches the next page of Entitlements objects from the API.

Yield:

A generator yielding Entitlements objects.

classmethod from_endpoint(authenticator: Authenticator, pagination_args: PaginationArguments, title_ids: str) Self[source]#

Creates an instance of GameEntitlementsIterator from the given endpoint.

Parameters:
  • authenticator – The Authenticator instance used for making authenticated requests to the API.

  • pagination_args – Arguments for handling pagination, including limit, offset, and page size.

  • title_ids – Comma-separated string of title IDs to filter and check if the client owns any of the specified titles.

Returns:

An instance of GameEntitlementsIterator.

class GameMeta[source]#

Bases: TypedDict

Metadata about the game.

iconUrl: str#
name: str#
packageType: str#
type: str#
class RewardMeta[source]#

Bases: TypedDict

Metadata about rewards for the entitlement.

retentionPolicy: int#
rewardServiceType: int#
class TitleMeta[source]#

Bases: TypedDict

Metadata about the game title.

imageUrl: str#
name: str#
titleId: str#