プレイヤーツール
VALOTOWNに登録されているプレイヤーの検索・スタッツ・試合履歴を取得します。
get_me
認証中のユーザー自身のRiotID・プロフィール情報を返します。自分の profile_uuid や riot_id を確認したい場合に使います。
パラメーター
なし(認証トークンから自動取得)
レスポンス
json
{
"profile_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"riot_name": "PlayerName",
"riot_tag": "JP1",
"riot_id": "PlayerName#JP1",
"display_name": "表示名",
"current_rr": 1234,
"play_count": 892,
"registered_at": "2024-03-15 12:00:00"
}使用例
get_me()
→ 自分のriot_idとprofile_uuidを取得
→ 取得したprofile_uuidをget_player_agent_breakdownなどに渡す使い方
get_me で取得した profile_uuid をそのまま他の分析ツールに渡すと、自分のデータを簡単に取得できます。
search_player
プレイヤーをRiot名またはタグで検索します。
パラメーター
| 名前 | 型 | デフォルト | 説明 |
|---|---|---|---|
name | string | 必須 | Riot名(部分一致) |
tag | string | "" | タグライン(部分一致、省略可) |
limit | int | 10 | 取得件数(最大50) |
offset | int | 0 | ページネーション用オフセット |
レスポンス
json
{
"total": 42,
"limit": 10,
"offset": 0,
"results": [
{
"profile_uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"riot_name": "PlayerName",
"riot_tag": "JP1",
"riot_id": "PlayerName#JP1",
"display_name": "表示名",
"name_hidden": false,
"current_rr": 1234,
"play_count": 892,
"registered_at": "2024-03-15 12:00:00"
}
]
}使用例
# 名前だけで検索
search_player(name="Ranze")
# 名前とタグで絞り込み
search_player(name="Ranze", tag="0505")
# 続きを取得
search_player(name="Ranze", limit=10, offset=10)備考
total が limit より大きい場合は offset を増やして全件取得できます。
プライバシー設定
valopedia_searchable を無効にしているプレイヤーは検索結果に表示されません。
get_player_stats
プレイヤーの詳細スタッツを取得します。
パラメーター
| 名前 | 型 | 説明 |
|---|---|---|
profile_uuid | string | search_player で取得したUUID |
レスポンス
json
{
"profile_uuid": "xxxxxxxx-...",
"riot_name": "PlayerName",
"riot_tag": "JP1",
"riot_id": "PlayerName#JP1",
"display_name": "表示名",
"name_hidden": false,
"current_rr": 1234,
"play_count": 892,
"registered_at": "2024-03-15 12:00:00",
"val_stats": { ... },
"cached_stats": { ... }
}使用例
get_player_stats(profile_uuid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")get_player_matches
プレイヤーの試合履歴を取得します。
パラメーター
| 名前 | 型 | デフォルト | 説明 |
|---|---|---|---|
profile_uuid | string | 必須 | プレイヤーのUUID |
limit | int | 20 | 取得件数(最大100) |
offset | int | 0 | オフセット |
queue | string | "" | キュー絞り込み(下記参照) |
queueの値:
| 値 | 説明 |
|---|---|
competitive | コンペティティブ(ランク戦) |
unrated | アンレート |
swiftplay | スウィフトプレイ |
deathmatch | デスマッチ |
hurm | チームデスマッチ |
"" | 全キュー |
レスポンス
json
{
"total": 892,
"limit": 20,
"offset": 0,
"results": [
{
"match_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"match_url": "https://valo.town/match/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"map_id": "/Game/Maps/Ascent/Ascent",
"queue": "competitive",
"game_mode": "Competitive",
"is_ranked": true,
"started_at": "1784374685375",
"duration_ms": "2255061"
}
]
}使用例
# 直近20件(全キュー)
get_player_matches(profile_uuid="...")
# コンペティティブ直近50件
get_player_matches(profile_uuid="...", queue="competitive", limit=50)
# 続きを取得
get_player_matches(profile_uuid="...", queue="competitive", limit=50, offset=50)非公開設定
試合履歴を「非公開」に設定しているプレイヤーのデータは、本人以外からは取得できません。
match_id の活用
取得した match_id は以下のツールで活用できます:
get_match_detail→ 詳細データget_match_weapon_stats→ 武器統計get_retake_stats→ リテイク率(複数IDをまとめて渡す)
