Skip to main content
Ctrl+K
PSNAWP - Home

The PSNAWP class

  • psnawp_api.psnawp module

PSNAWP Modules

  • psnawp_api package
    • psnawp_api.core package
      • psnawp_api.core.authenticator module
      • psnawp_api.core.psnawp_exceptions module
      • psnawp_api.core.request_builder module
    • psnawp_api.models package
      • psnawp_api.models.group package
        • psnawp_api.models.group.group module
        • psnawp_api.models.group.group_datatypes module
      • psnawp_api.models.listing package
        • psnawp_api.models.listing.pagination_iterator module
      • psnawp_api.models.search package
        • psnawp_api.models.search.games_search module
        • psnawp_api.models.search.games_search_datatypes module
        • psnawp_api.models.search.universal_search module
        • psnawp_api.models.search.users_result_datatypes module
        • psnawp_api.models.search.users_search module
      • psnawp_api.models.trophies package
        • psnawp_api.models.trophies.trophy module
        • psnawp_api.models.trophies.trophy_constants module
        • psnawp_api.models.trophies.trophy_group module
        • psnawp_api.models.trophies.trophy_summary module
        • psnawp_api.models.trophies.trophy_titles module
        • psnawp_api.models.trophies.trophy_utils module
      • psnawp_api.models.client module
      • psnawp_api.models.game_entitlements module
      • psnawp_api.models.game_title module
      • psnawp_api.models.title_stats module
      • psnawp_api.models.user module
    • psnawp_api.utils package
      • psnawp_api.utils.endpoints module
      • psnawp_api.utils.misc module
    • psnawp_api.psnawp module

Additional Resources:

  • Readme
  • Authors
  • Licenses
  • .rst

psnawp_api.models.search.games_search module

Contents

  • UniversalDomainSearchIterator
    • UniversalDomainSearchIterator.__init__()
    • UniversalDomainSearchIterator.fetch_next_page()
    • UniversalDomainSearchIterator.fetch_results()
    • UniversalDomainSearchIterator.from_endpoint()

psnawp_api.models.search.games_search module#

Implements the endpoints to search games.

class UniversalDomainSearchIterator(authenticator: Authenticator, url: str, pagination_args: PaginationArguments, search_query: str, search_domain: SearchDomain, next_cursor: str)[source]#

Bases: PaginationIterator[GameSearchResultItem]

Iterator for paginating over universal search results within a specific domain.

This iterator handles the pagination logic for querying the PlayStation Network’s universal search API, which can be used to search across different domains (e.g., games, add-ons, users). It allows for iterating over search results based on the provided search query and domain.

Variables:
  • search_query (str) – The search query string used to query the universal search endpoint.

  • search_domain (SearchDomain) – The specific domain within which the search is performed (e.g., games, add-ons, users).

  • next_cursor (str) – The cursor used for paginating to the next set of results.

Note

This class is intended to be used via UniversalSearch. See UniversalSearch.

Initializes the UniversalDomainSearchIterator with the provided parameters.

This iterator fetches search results from the PlayStation universal search API and manages pagination.

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

  • url – The URL of the universal search endpoint.

  • pagination_args – Pagination-specific arguments, such as page size and limit, passed to the endpoint.

  • search_query – The search query string to search for specific content.

  • search_domain – The domain to search within (e.g., games, add-ons, users).

  • next_cursor – The cursor for fetching the next page of results.

__init__(authenticator: Authenticator, url: str, pagination_args: PaginationArguments, search_query: str, search_domain: SearchDomain, next_cursor: str) → None[source]#

Initializes the UniversalDomainSearchIterator with the provided parameters.

This iterator fetches search results from the PlayStation universal search API and manages pagination.

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

  • url – The URL of the universal search endpoint.

  • pagination_args – Pagination-specific arguments, such as page size and limit, passed to the endpoint.

  • search_query – The search query string to search for specific content.

  • search_domain – The domain to search within (e.g., games, add-ons, users).

  • next_cursor – The cursor for fetching the next page of results.

fetch_next_page() → Generator[GameSearchResultItem, None, None][source]#

Fetches the next page of Search Result objects from the API.

Yield:

A generator yielding Result objects.

classmethod fetch_results(authenticator: Authenticator, pagination_args: PaginationArguments, search_query: str, search_domain: SearchDomain) → Generator[GameSearchResultItem, None, None][source]#

Initiates a game search and yields results based on the specified search domain.

This method uses two endpoints: - The first retrieves a mix of full games and add-ons. - The second iterates over paginated results in the selected domain.

Parameters:
  • authenticator – Instance of Authenticator used for authenticated API requests.

  • pagination_args – Pagination control including current offset and limit.

  • search_query – The query string to search for content.

  • search_domain – The content domain to search within (e.g., full games or add-ons).

Yield:

Yields individual GameSearchResultItem objects until the limit is reached. If more results are available, continues yielding from the appropriate paginated endpoint.

classmethod from_endpoint(authenticator: Authenticator, pagination_args: PaginationArguments, search_query: str, search_domain: SearchDomain, next_cursor: str) → Self[source]#

Creates an instance of UniversalDomainSearchIterator from api endpoint.

previous

psnawp_api.models.search package

next

psnawp_api.models.search.games_search_datatypes module

Contents
  • UniversalDomainSearchIterator
    • UniversalDomainSearchIterator.__init__()
    • UniversalDomainSearchIterator.fetch_next_page()
    • UniversalDomainSearchIterator.fetch_results()
    • UniversalDomainSearchIterator.from_endpoint()

By Yoshikage Kira (@isFakeAccount)

© Copyright 2025, Yoshikage Kira.