I've been working on this for a while now, and while it's not anywhere near finished yet, I wanted to publish it here since it's in a somewhat usable state now.
https://github.com/dazarobbo/BungieNetPlatform
You can do some fun things with it like:
[quote]$db = new ContentDatabase('/path/to/sqlite/database');
Hash::setDefaultTranslator(new CachedHashTranslator($db));
$hash = new Hash('2271682572', HashType::CLASS_DEFINITION());
$classDef = $hash->getContent();
$classDef->Name; //Warlock[/quote]
[quote]$platform = new Platform('API KEY');
$r = $platform->DestinyService->getAccount(
BungieMembershipType::TIGER_PSN(),
'4611686018429501017');
print_r($r->getInnerResponse()->getResponse()); //DeeJ's Destiny account[/quote]
[quote]$platform = new Platform('API KEY');
$platform->setUser(new PsnUser('email@address.com', 'hunter2');
$platform->authenticateUser();
$platform->setUserContext(true);
$r = $platform->DestinyService->getVault(
BungieMembershipType::TIGER_PSN(),
'account id here'); //Get your vault[/quote]
It's still woefully underdone, though. So feel free to fork it or use it however you like, but I will be maintaining this for the foreseeable future. Some notes if you do use it:
- You'll find it uses some data structures that aren't in the PHP core, like ArrayList, Enum, BitwiseEnum, Set, etc... These are from [url=https://github.com/dazarobbo/Cola]another library[/url] I'm writing alongside this one.
- It largely follows [url=http://bungienetplatform.wikia.com/]the wiki[/url], so you'll find the phpDocs will often point to there.
- The responses from calling a platform service current return a base response type, but this won't always be the case. I endeavour to parse these into more useful PHP classes. The same for getting associated Hash content.
- Even if you're not wanting to use all of it, you'll probably still get something out of the [url=https://github.com/dazarobbo/BungieNetPlatform/tree/master/src/Services/Destiny/Manifest]Manifest[/url] namespace, [url=https://github.com/dazarobbo/BungieNetPlatform/tree/master/src/Exceptions/Platform]platform exceptions[/url], and [url=https://github.com/dazarobbo/BungieNetPlatform/tree/master/src/Enums]enums[/url].
- It's [b]not[/b] on packagist.org yet, so you won't be able to install it via composer without [url=https://getcomposer.org/doc/05-repositories.md#vcs]a little workaround[/url].
I moderatori possono proibire a questo utente di inviare messaggi (saltando la coda delle segnalazioni) selezionando una punizione adeguata.
Ban di 7 giorni
Ban di 7 giorni
Ban di 30 giorni
Ban permanente
Questo sito utilizza cookie per fornire un migliore servizio agli utenti. Cliccando su "Accetto", accetti le politiche esposte su Politica sui cookie e Politica sulla privacy.
Accetto
Questo sito utilizza cookie per fornire un migliore servizio agli utenti. Continuando a navigare su questo sito, accetti le politiche esposte su Politica sui cookie e Politica sulla privacy.
Di recente, le nostre politiche sono cambiate. Continuando a navigare su questo sito, accetti le ultime politiche esposte su Politica sui cookie e Politica sulla privacy.