From: Christian Weiske Date: Sat, 4 Jan 2020 23:50:20 +0000 (+0100) Subject: build current_gamer json X-Git-Tag: v1.0.0~19 X-Git-Url: https://git.cweiske.de/stouyapi.git/commitdiff_plain/5af099a647da421553d00abe5a4f3d6ed21873a6 build current_gamer json --- diff --git a/bin/import-game-data.php b/bin/import-game-data.php index d4033af..5486ef5 100755 --- a/bin/import-game-data.php +++ b/bin/import-game-data.php @@ -113,6 +113,12 @@ foreach ($developers as $developer) { . '/products/index.htm', buildDeveloperProducts($developer['products'], $developer['info']) ); + writeJson( + //index.htm does not need a rewrite rule + 'api/v1/developers/' . $developer['info']->uuid + . '/current_gamer', + buildDeveloperCurrentGamer() + ); } writeJson('api/v1/discover-data/discover.json', buildDiscover($games)); @@ -432,6 +438,16 @@ function buildDetails($game) ]; } +function buildDeveloperCurrentGamer() +{ + return [ + 'gamer' => [ + 'uuid' => '00702342-0000-1111-2222-c3e1500cafe2', + 'username' => 'stouyapi', + ], + ]; +} + /** * For /api/v1/developers/xxx/products/?only=yyy */