Closed vicegold closed 1 year ago
Could you provide some code?
The code seems to be working pretty fine.
Here are the code for avatars for a single user:
$username = 'psnuserhere';
$acc = $client->users()->search($username)->first()->accountId();
$user = $client->users()->find($acc);
var_dump($user->avatarUrls());
foreach ($user->avatarUrls() as $avatarUrl) {
echo $avatarUrl;
}
Or in case you are trying to search the users and get their avatars:
$searchTerm = 'psnuserhere'
$users = $client->users()->search($searchTerm );
foreach ($users as $user) {
var_dump($user->avatarUrls());
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Both
avatarUrl
andavatarUrls
return this errorInvalid argument supplied for foreach on line 160 in tustin/psn-php/src/Model/User.php
when usingsearch()
on 3.0.