Skip to content

getting trophy title for ps3 and vita #44

Closed Answered by isFakeAccount
glebmiller asked this question in Q&A
Discussion options

You must be logged in to vote

You can use this code example to get all your PS3/PSVITA Trophies, Trophy titles, groups, etc...

from os import getenv

from dotenv import load_dotenv
from psnawp_api import PSNAWP
from psnawp_api.models.trophies import PlatformType

load_dotenv()


def main() -> None:
    psn = PSNAWP(getenv("NPSSO_CODE", "NPSSO_CODE"))
    client = psn.me()

    print("Trophy Titles")
    trophy_titles = client.trophy_titles(limit=100)
    for trophy_title in trophy_titles:
        if PlatformType.PS3 in trophy_title.title_platform:
            print(trophy_title.title_name, trophy_title.title_platform, trophy_title.earned_trophies, trophy_title.np_communication_id)

    print("\nTrophies")
    for trophy 

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@glebmiller
Comment options

@isFakeAccount
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by isFakeAccount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants