From 3ed995edebaae5b023f52a95ae35fd0d4bddace3 Mon Sep 17 00:00:00 2001 From: Antosik Date: Sun, 25 Aug 2024 22:37:56 +0300 Subject: [PATCH] feat: add neutral_token drops data --- global.d.ts | 1 + routes/responses/MatchResponse.ts | 18 ++++++++++++++++++ sql/create_tables.sql | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/global.d.ts b/global.d.ts index ef3019fbd..b6faabb32 100644 --- a/global.d.ts +++ b/global.d.ts @@ -154,6 +154,7 @@ interface ParsedPlayer extends Player { obs: any; sen: any; lane_role: number | null; + neutral_tokens_log: any[]; party_size?: number; diff --git a/routes/responses/MatchResponse.ts b/routes/responses/MatchResponse.ts index 848faa597..5e56c4568 100644 --- a/routes/responses/MatchResponse.ts +++ b/routes/responses/MatchResponse.ts @@ -913,6 +913,24 @@ export default { 'Object containing information on certain benchmarks like GPM, XPM, KDA, tower damage, etc', type: 'object', }, + neutral_tokens_log: { + description: + 'Object containing information on neutral tokens drops', + type: 'array', + items: { + type: 'object', + properties: { + time: { + description: 'Time in seconds at which the token was dropped', + type: 'integer', + }, + key: { + description: 'Type of token dropped', + type: 'string', + } + }, + }, + }, }, }, }, diff --git a/sql/create_tables.sql b/sql/create_tables.sql index 231101e3e..6175275bd 100644 --- a/sql/create_tables.sql +++ b/sql/create_tables.sql @@ -137,7 +137,8 @@ CREATE TABLE IF NOT EXISTS player_matches ( roshans_killed int, observers_placed int, party_size int, - net_worth int + net_worth int, + neutral_tokens_log json[] ); CREATE INDEX IF NOT EXISTS player_matches_account_id_idx on player_matches(account_id) WHERE account_id IS NOT NULL; CREATE INDEX IF NOT EXISTS player_matches_hero_id_idx on player_matches(hero_id);