psnawp_api.models.search.universal_search module#
Provides Universal Search Class to search the Playstation network.
- class UniversalSearch(authenticator: Authenticator, pagination_args: PaginationArguments, search_query: str)[source]#
Bases:
objectA class to interact with the PlayStation Universal Search endpoint.
The UniversalSearch class allows querying the PlayStation API to search for video games, add-ons, and other users. It constructs the necessary parameters and handles pagination for performing the search.
- Variables:
authenticator (Authenticator) – An instance of
Authenticatorused to authenticate and make HTTPS requests.pagination_args (PaginationArguments) – Pagination-specific arguments, such as page size and limit, passed to the endpoint.
search_query (str) – The search query string that will be passed to the API endpoint to search for content.
Note
This class is intended to be used via PSNAWP class. See
psnawp_api.psnawp.PSNAWP.search().Initializes the UniversalSearch object.
- Parameters:
authenticator – The Authenticator instance used for making authenticated requests to the API.
pagination_args – Arguments related to pagination like limit and offset.
search_query – The search query string that will be passed to the API endpoint to search for content.
- __init__(authenticator: Authenticator, pagination_args: PaginationArguments, search_query: str) None[source]#
Initializes the UniversalSearch object.
- Parameters:
authenticator – The Authenticator instance used for making authenticated requests to the API.
pagination_args – Arguments related to pagination like limit and offset.
search_query – The search query string that will be passed to the API endpoint to search for content.
- search_game(search_domain: SearchDomain) Generator[GameSearchResultItem, None, None][source]#
Searches games/game-addons on the Playstation Network.
- Parameters:
search_domain – The specific domain within which the search is performed (e.g., games, add-ons, users).
- search_user() Generator[UserSearchResultItem, None, None][source]#
Searches users on the Playstation Network.