Skip to content

Commit

Permalink
Adds new $playtimeTwoWeeksReadable value for Games
Browse files Browse the repository at this point in the history
$playtimeTwoWeeks now holds the raw minutes, $playtimeTwoWeeksReadable holds the human readable value like `2 hours 34 minutes`
  • Loading branch information
Kovah committed Oct 27, 2016
1 parent e67a4f7 commit 2d7b35b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Syntax/SteamApi/Containers/Game.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class Game extends BaseContainer

public $playtimeTwoWeeks;

public $playtimeTwoWeeksReadable;

public $playtimeForever;

public $playtimeForeverReadable;
Expand All @@ -26,7 +28,8 @@ public function __construct($app)
{
$this->appId = $app->appid;
$this->name = $this->checkIssetField($app, 'name');
$this->playtimeTwoWeeks = isset($app->playtime_2weeks) ? $this->convertFromMinutes($app->playtime_2weeks) : '0 minutes';
$this->playtimeTwoWeeks = $this->checkIssetField($app, 'playtime_2weeks', 0);
$this->playtimeTwoWeeksReadable = $this->convertFromMinutes($this->playtimeTwoWeeks);
$this->playtimeForever = $this->checkIssetField($app, 'playtime_forever', 0);
$this->playtimeForeverReadable = $this->convertFromMinutes($this->playtimeForever);
$this->icon = $this->checkIssetImage($app, 'img_icon_url');
Expand Down

0 comments on commit 2d7b35b

Please sign in to comment.