Skip to content

How do I retrieve the trophy list for a specific game? #264

@Askancy

Description

@Askancy

It is not clear to me how I can retrieve the trophy list of a game.

In the documentation under ‘trophy titles’ I have:

$titles = $user->trophyTitles(); // Get each trophy title

so, if i write:

$titles = $user->trophyTitles()->withName('Red Dead Redemption');

foreach ($titles as $title) {
    echo $title->name() .'<br>';
}

I would expect to find a list of the game Red Dead Redemption, no?

Instead, I receive as output the games that have Red Dead Redemption as their name, namely:

Red Dead Redemption
Red Dead Redemption
Red Dead Redemption 2

using:

    $titles = $user->trophyTitles()->withName('Red Dead Redemption');
   dd($titles);

-lastResponse: ? GuzzleHttp\Psr7\Response
#platforms: []
-withName: "Red Dead Redemption"
-hasTrophyGroups: null

I want to receive the list of Red Dead Redemption trophies, but in the documentation I can't figure out how to do it....

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions