Post: PSN API Wrappers (Golang/PHP)
04-16-2016, 01:27 AM #1
Tustin
Balls of Steel
(adsbygoogle = window.adsbygoogle || []).push({}); This thread will now be dedicated to both my PHP and Golang PSN API wrapper libraries. I still work on both (although more-so the golang one atm because it still needs features) so I don't want to manage two different threads.

PHP

I wrote this PHP wrapper for the PSN API. Some people had asked for the code of the PSN Lookup on my website, but I wanted to clean it up before sharing it. This can do that, and (eventually) more. As of right now it just has authentication but I have created classes for friends, messaging, activity and trophies but I need to clean them up a bit before committing it to the repo. It's pretty clean if I do say so myself and it works very well. Feel free to check out the code and star/watch it if you're interested in updates.

You must login or register to view this content.

If you want to use it, the readme has proper documentation of what is available so far.



Go

Still a WIP but this will soon become up to speed with the PHP version. No docs atm but when I'm done, they will be made.

You must login or register to view this content.

Last edited by Tustin ; 05-21-2017 at 05:25 AM.

The following 10 users say thank you to Tustin for this useful post:

Father Luckeyy, IcarusXSEC, Kryptus, Norway-_-1999, Octolus, OgKillaBee187, Passion, THΞSPIKYBROHD, tyman1294
05-14-2016, 04:44 AM #11
Tustin,
You should add Proxy support when using the API.
This way if Sony blocks the Proxy's IP you can just change it with ease.
Also this prevents the server's ip from getting blocked/banned.

The following user thanked D4tabase for this useful post:

tyman1294
05-29-2016, 04:45 PM #12
Tustin
Balls of Steel
I added proper exception handling to the authentication process in the newest commit: You must login or register to view this content.

Use it like so:
    
try
{
$account = new \PSN\Auth\Auth("[email protected]", "password");
}
catch (\PSN\Auth\PSNAuthException $e)
{
header("Content-Type: application/json");
//handle this in some way better than what I'm doing here
die($e->GetError());
}
06-05-2016, 09:00 PM #13
Tustin
Balls of Steel
Started writing a new version of this in Golang. It won't take over the PHP one as I mostly just wrote this one to learn Go a bit:
You must login or register to view this content.
02-04-2017, 07:42 AM #14
Tustin
Balls of Steel
Spent like 2 hours tonight writing proper documentation for this library:
You must login or register to view this content.

Should be easier to pick up now Smile

The following 4 users say thank you to Tustin for this useful post:

Father Luckeyy, Kronos, Specter, SQUID-EYE
05-21-2017, 05:27 AM #15
Tustin
Balls of Steel
This thread is now for both my PHP and Go libraries. I decided to merge them into one thread since they both have active development and I don't want to manage two threads for the same type of lib. Golang is still catching up to the PHP version so it lacks quite a bit but it will eventually have the same features as the PHP lib.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo