Closed OsamaHeweitat closed 5 days ago
I removed get_title_id()
for a few reasons.
title_id
like previous endpoint. It returns content id.There are two ways of getting title id.
from os import getenv
from dotenv import load_dotenv
from psnawp_api import PSNAWP
from psnawp_api.models import SearchDomain
load_dotenv()
def main() -> None:
psn = PSNAWP(getenv("NPSSO_CODE", "NPSSO_CODE"))
search = psn.search("Fallout 76", search_domain=SearchDomain.FULL_GAMES, limit=1)
for result in search:
print("Game Title Name", result["result"]["invariantName"])
print("Content ID", result["result"]["defaultProduct"]["id"])
if __name__ == "__main__":
main()
This will print
Game Title Name Fallout 76
Content ID UP1003-CUSA12057_00-PRJMTN0000000000
The title id here is CUSA12057_00
which you can extract easily.
Thank you very much, this is a good replacement.
I am reopening this issue because in the documentation there still are references to get_title_id
I'll close it when documentation is updated.
This will print
Game Title Name Fallout 76 Content ID UP1003-CUSA12057_00-PRJMTN0000000000
The title id here is CUSA12057_00 which you can extract easily.
Is there a way to get the full Content ID (e.g. UP1003-CUSA12057_00-PRJMTN0000000000) without using search? such as using the trophy title? if not, is it something that would be possible to implement or is this a limitation of the API?
Is there a way to get the full Content ID (e.g. UP1003-CUSA12057_00-PRJMTN0000000000) without using search? such as using the trophy title? if not, is it something that would be possible to implement or is this a limitation of the API?
@OsamaHeweitat trophyTitles endpoint does not return Title ID. Trophies use a different ID system which is called npCommunicationId
. You really only need title id for one method.
https://andshrew.github.io/PlayStation-Titles/ is probably the best way to find title ids besides the search endpoint.
The "Implements GraphQL endpoint for the Search Class" removed the
get_title_id()
functionality from search.