-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How Can I Show Every AccountId Searched? #248
Comments
|
Thank you for your quick response, is there a chance to get also the Country and Language from Search() option? Or should I go for that information with "find('accountId')" method? Thank you. |
Country, yes. Look at https://github.com/Tustin/psn-php/blob/master/src/Model/User.php to see all of the methods available. Lines 128 to 136 in 5d9a357
Please note that country is only obtained via search(), and not via find(). This is a limitation from Sony, not this API. Don't know what you mean about language. EDIT: Found this, but I have never used it. Lines 205 to 211 in 5d9a357
Also: https://tustin.dev/psn-php/#/users?id=languages |
Thank you very much Ragowit, you are always here helping noobs like me hehehe One question, when I try to get title->platform(), I get this enum error: Fatal error: Uncaught Error: Cannot instantiate enum Tustin\PlayStation\Enum\ConsoleType), I see that consoleType is a enum type and platform() function return an array, but I don't know why I receive that error, I have PHP 8.2. And final question, I manage to get all games with the trophy summary of an specific player, the question is: How can I get now the trophies associated that the player has earned? Thank you again Ragowit. |
For platforms, I believe I did this hack (there's certainly a cleaner way):
And for earned trophies:
Here's the source of all the methods you can use for $trophy: https://github.com/Tustin/psn-php/blob/master/src/Model/Trophy/Trophy.php |
Thank you Ragowit, your Platform method is still giving me the same error, and Any ideas how to solve those 2 issues? Thank you, I'm trying hard to figure it out :) |
Sorry, I'm at loss. Maybe @Tustin can fill you out when he's around. |
No worries mate, you did well and help me out a lot :) |
One question, is it possible to get the Trophy Group Name? I'm trying and always return a null. I only managed to get the Trophy Group ID (default, 002, 003 etc). Thanks :) |
Check https://github.com/Tustin/psn-php/blob/master/src/Model/Trophy/TrophyGroup.php You have title(), name() and detail(), it should be one of those. |
Hello, about TrophyGroup->name() and detail() are apparently not working, I just managed to get the title() object, but I don't know how to access ["trophyTitleName"] in that object, this is the object returned:
|
To get trophy data like title, you can't go via user's TrophyTitles (that will only bring you like trophy earned data for that user). Let me add more code to my previous reply:
|
Thank you very much Ragowit, I think I have everything now, just last questoin, the "earnedRate()" is specific of every player? I thought that was a global var that indicates the rarity of a trophy, or am I wrong? Thanks :) |
I have never used that myself, but I think it's a global var that indicates the rarity of a trophy. Maybe it changes so often so Sony decided to have that data on the user? |
Ok I see, thank you Ragowit :) |
Hello, I'm trying to use this API again, and thanks in advance for this work.
I want to use AccountID of every user instead of "onlineId", and the problem is that when I try to access the object values, I can't go directly to every user Account ID that matched the criteria, how can I show or save every data?
For example:
$users = $client->users()->search('tustin25');
foreach($users as $user) { // How can I get every user AccountID? }
Thanks for your help.
The text was updated successfully, but these errors were encountered: