200でもエラーの時があるのでsuccessも見るようにする
やり方これであってるのか?
This commit is contained in:
parent
c061a51f8f
commit
9306a4376c
@ -26,6 +26,9 @@ class SteamResolver implements Resolver
|
|||||||
$res = $this->client->get('https://store.steampowered.com/api/appdetails/?l=japanese&appids=' . $appid);
|
$res = $this->client->get('https://store.steampowered.com/api/appdetails/?l=japanese&appids=' . $appid);
|
||||||
if ($res->getStatusCode() === 200) {
|
if ($res->getStatusCode() === 200) {
|
||||||
$json = json_decode($res->getBody()->getContents(), true);
|
$json = json_decode($res->getBody()->getContents(), true);
|
||||||
|
if($json[$appid]['success'] === false){
|
||||||
|
throw new \RuntimeException("API response [$appid][success] is false: $url");
|
||||||
|
}
|
||||||
$data = $json[$appid]['data'];
|
$data = $json[$appid]['data'];
|
||||||
$metadata = new Metadata();
|
$metadata = new Metadata();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user