-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
Description
Version: 5.0.0.x-dev
I'm getting a bit desperate at the moment.
No matter what I try, I can't get my own trophies because the code exits at a certain point.
Breakdown of my Code:
I have completely reduced the code for the purpose of simplicity
foreach ($this->me->trophyTitles() as $game) {
if ($game->hasTrophies()) {
foreach ($game->trophyGroups() as $trophyGroup) {
foreach ($trophyGroup->trophies() as $trophy) {
}
}
}
The Code throws an Exception:
Call to a member function getUser() on null
if ($this->title instanceof UserTrophyTitle) {
$results = $this->get(
'trophy/v1/users/' . $this->title->getFactory()->getUser()->accountId() . '/npCommunicationIds/' . $this->title->npCommunicationId() . '/trophyGroups',
[
'npServiceName' => $this->title->serviceName()
]
);
When I test what $this->title->getFactory() returns, it is always null
Unfortunately, other issue entries have not helped me and the instructions are a bit old, so I hope someone can help me.
Basically, the endpoints fit to retrieve all my trophies (at least compared to another system)