https://www.dotabuff.com
気になったので調べてみたら、やはり Web API があるようで。
https://wiki.teamfortress.com/wiki/WebAPI#Dota_2
試してみました。
API Key を取得する
自分のプロフィールを取得してみる
$key = "YOUR_KEY";
$steamid = "76561197961028586";
$curl = curl_init("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v2/?key={$key}&steamids={$steamid}");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
var_dump($response);
curl_close($curl);
{
"response": {
"players": [
{
"steamid": "76561197961028586",
"communityvisibilitystate": 3,
"profilestate": 1,
"personaname": "TANAKA",
"lastlogoff": 1518968667,
"profileurl": "http://steamcommunity.com/id/jumtana/",
"avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/bd/bd0af6bb099845e0c93d3bba467cdd96e743ce51.jpg",
"avatarmedium": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/bd/bd0af6bb099845e0c93d3bba467cdd96e743ce51_medium.jpg",
"avatarfull": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/bd/bd0af6bb099845e0c93d3bba467cdd96e743ce51_full.jpg",
"personastate": 1,
"realname": "Jumpei Tanaka",
"primaryclanid": "103582791429548415",
"timecreated": 1063939457,
"personastateflags": 0,
"loccountrycode": "JP",
"locstatecode": "40",
"loccityid": 26138
}
]
}
}
単純に上記だけであれば、GET なのでブラウザでも見れます。
次は対戦履歴でも取得してみます。