Skip to content

Commit 8f0102a

Browse files
Travis BlasingameTravis Blasingame
authored andcommitted
Updaing the example file to include the new fields. Added personaStateId to see the original id given by steam.
1 parent dcc3aa6 commit 8f0102a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

examples/user/GetPlayerSummaries.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ Array
1212
[avatarMedium] => <img src="http://media.steampowered.com/steamcommunity/public/images/avatars/3a/3a718856298ce108a71dfd5b0bc5eb913a8ff650_medium.jpg" />
1313
[avatarFull] => <img src="http://media.steampowered.com/steamcommunity/public/images/avatars/3a/3a718856298ce108a71dfd5b0bc5eb913a8ff650_full.jpg" />
1414
[personaState] => Online
15+
[personaStateId] => 3
16+
[realName] => Joe Smith
1517
[primaryClanId] => 103582791435113986
1618
[timecreated] => March 15th, 2010 01:31pm
1719
[personaStateFlags] => 0
20+
[locCountryCode] => US
21+
[locStateCode] => TX
22+
[locCityId] => 3620
1823
)
1924

2025
)

src/Syntax/SteamApi/Containers/Player.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class Player {
2222

2323
public $personaState;
2424

25+
public $personaStateId;
26+
2527
public $realName;
2628

2729
public $primaryClanId;
@@ -48,13 +50,14 @@ public function __construct($player)
4850
$this->avatarMedium = $this->getImageForAvatar($player->avatarmedium);
4951
$this->avatarFull = $this->getImageForAvatar($player->avatarfull);
5052
$this->personaState = $this->convertPersonaState($player->personastate);
53+
$this->personaStateId = $player->personastate;
5154
$this->realName = isset($player->realname) ? $player->realname : null;
5255
$this->primaryClanId = isset($player->primaryclanid) ? $player->primaryclanid : null;
5356
$this->timecreated = isset($player->timecreated) ? date('F jS, Y h:ia', $player->timecreated) : null;
5457
$this->personaStateFlags = isset($player->personastateflags) ? $player->personastateflags : null;
55-
$this->locCountryCode = isset($player->loccountrycode) ? $player->loccountrycode : null;
56-
$this->locStateCode = isset($player->locstatecode) ? $player->locstatecode : null;
57-
$this->locCityId = isset($player->loccityid) ? $player->loccityid : null;
58+
$this->locCountryCode = isset($player->loccountrycode) ? $player->loccountrycode : null;
59+
$this->locStateCode = isset($player->locstatecode) ? $player->locstatecode : null;
60+
$this->locCityId = isset($player->loccityid) ? $player->loccityid : null;
5861
}
5962

6063
protected function getImageForAvatar($image)

0 commit comments

Comments
 (0)