WIP: STEAMでゲームのリストを取得する。
STEAMに取り扱われているゲームの全ての情報をAPIで取得する方法について調べた。 情報は2段階で取得する必要がある。
- アプリのIDのリストを取得する
- アプリの詳細情報を取得する
1. アプリのIDのリストを取得する
アプリのIDリストを取得するには、GetAppList
を利用する。
パラメーターはなしで、全てのアプリIDと名前のペアのリストを取得できる。
API URL
GET https://api.steampowered.com/ISteamApps/GetAppList/v2/
データ構造
applist - apps: アプリケーションを含むリスト。 - appid: uint32 - アプリのApp ID - name: string - アプリの名称
出力サンプル
{ "applist":{ "apps":[ {"appid":216938,"name":"Pieterw test app76 ( 216938 )"}, {"appid":660010,"name":"test2"}, {"appid":660130,"name":"test3"}, {"appid":1118314,"name":""} ] } }
2. アプリの詳細情報を取得する
API URL
GET https://store.steampowered.com/api/appdetails/?appids=
参考URL
ISteamApps Interface (Steamworks Documentation) User:RJackson/StorefrontAPI - Official TF2 Wiki | Official Team Fortress Wiki