Beispiel #1
0
 public function fetchAccountsPresence($accounts)
 {
     $client = new GuzzleClient(['base_uri' => XboxConstants::$getBaseXboxAPI]);
     // Set up getCommands
     $requests = array();
     foreach ($accounts as $account) {
         if ($account->xuid == null) {
             $destiny = new DestinyClient();
             $account = $destiny->fetchAccountData($account);
         }
         $url = sprintf(XboxConstants::$getPresenceUrl, $account->xuid);
         $requests[$account->seo] = $client->getAsync($url, ['headers' => ['X-AUTH' => env('XBOXAPI_KEY')]]);
     }
     $results = GuzzlePromise\Unwrap($requests);
     return $results;
 }
Beispiel #2
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $client = new Client();
     $account = $client->fetchAccountByGamertag($this->type, $this->gamertag);
     $client->fetchAccountData($account);
 }
Beispiel #3
0
 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $client = new Client();
     $client->fetchAccountData($this->account);
 }