Steam API を使用して、ユーザーに表示するゲームのリストを取得しています。ゲームがコントローラーをサポートしているかどうかを知りたいです。ゲームが Steam API からコントローラを完全にサポートしているか、一部のコントローラをサポートしているかを確認する方法はありますか?
1196 次
1 に答える
2
この情報は、appdetails呼び出しを使用して、非公式の StoreFront API 経由で見つけることができます。
http://store.steampowered.com/api/appdetails/?appids=<<APPID>>&filters=categories
<<APPID>>
数値のアプリケーション ID に置き換えます。これは、次のような json オブジェクトを返します。
{
"440":{
"success":true,
"data":{
"categories":[
{"id":"1","description":"Multi-player"},
{"id":"27","description":"Cross-Platform Multiplayer"},
{"id":"22","description":"Steam Achievements"},
{"id":"14","description":"Commentary available"},
{"id":"13","description":"Captions available"},
{"id":"31","description":"VR Support"},
{"id":"15","description":"Stats"},
{"id":"8","description":"Valve Anti-Cheat enabled"},
{"id":"18","description":"Partial Controller Support"},
{"id":"17","description":"Includes level editor"},
{"id":"29","description":"Steam Trading Cards"},
{"id":"30","description":"Steam Workshop"}
]
}
}
}
キー内で、categories
2 つの ID を探す必要があります。の を探すとid
、17
これは「Partial Controller Support」を示します。の を探すとid
、28
これは「フル コントローラー サポート」を示し、リストでは次のようになります。
{"id":"28","description":"Full controller support"}
于 2014-11-24T14:36:16.963 に答える