1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
.. _telemetry:
Telemetry
=========
The telemtry provides us insights into the match. It gives us details of various events that happened in the match alongwith the time when they happened. Some of the events also have location which can be plotted on a Vainglory Game map. Telemetry is very useful to generate a timeline visualtions of how the match went for replays, or create heatmaps of where a certin hero or ability is most useful. These are just some of the exmaples of where Telemtry can be used.
To get Telemetry Data
---------------------------
You start by pulling a list of matches using the matches endopoint.
**HTTP Request**
| ``GET https://api.dc01.gamelockerapp.com/shards/na/matches``
**Shell:**
.. code-block:: shell
curl "https://api.dc01.gamelockerapp.com/shards/na/matches" \
-H "Authorization: Bearer <api-key>" \
-H "Accept: application/vnd.api+json"
//The above command returns JSON structured like this:
"data": [
{
"type": "match",
"id": "f5373c40-0aa9-11e7-bcff-0667892d829e",
"attributes": {
"createdAt": "2017-03-17T00:38:00Z",
"duration": 259,
"gameMode": "blitz_pvp_ranked",
"patchVersion": "",
"shardId": "na",
"stats": {
"endGameReason": "victory",
"queue": "blitz_pvp_ranked"
},
"titleId": "semc-vainglory"
},
"relationships": {
"assets": {
"data": [
{
"type": "asset",
"id": "b900c179-0aaa-11e7-bb12-0242ac110005"
}
]
},
"rosters": {
"data": [
{
"type": "roster",
"id": "b8f6640a-0aaa-11e7-bb12-0242ac110005"
},
{
"type": "roster",
"id": "b8f65271-0aaa-11e7-bb12-0242ac110005"
}
]
},
"rounds": {
"data": []
}
}
},
//You need to look for Assets JSON node which points to telemetry. Check for the following in the response:
"relationships": {
"assets": {
"data": [
{
"type": "asset",
"id": "b900c179-0aaa-11e7-bb12-0242ac110005"
}
]
},
//Once you have located this ID, you now have to search for the following JSON segment in the response object. The following response object will provide you a link to the Telemtry data
{
"type": "asset",
"id": "b900c179-0aaa-11e7-bb12-0242ac110005",
"attributes": {
"URL": "https://gl-prod-us-east-1.s3.amazonaws.com/assets/semc-vainglory/na/2017/03/17/00/43/b900c179-0aaa-11e7-bb12-0242ac110005-telemetry.json",
"contentType": "application/json",
"createdAt": "2017-03-17T00:43:22Z",
"description": "",
"filename": "telemetry.json",
"name": "telemetry"
}
},
//You can download the data with following commands. Please note that you do not need API Key to get this data.
curl "https://gl-prod-us-east-1.s3.amazonaws.com/assets/semc-vainglory/na/2017/03/17/00/43/b900c179-0aaa-11e7-bb12-0242ac110005-telemetry.json" \
-H "Accept: application/vnd.api+json"
//This request will return you a response as follows:
{ "time": "2017-02-18T06:37:15+0000",
"type": "DealDamage",
"payload": {
"Team": "Left",
"Actor": "*Ringo*",
"Target": "*Turret*",
"Source": "Unknown",
"Damage": 405,
"Delt": 613,
"IsHero": 1,
"TargetIsHero": 0
}
}
Event Data Dictionary
---------------------------
Telemetry data is classified into several event of interest. Following is a list of every event type with an example.
**PlayerFirstSpawn:**
| At the start of the game when players spawn.
**Level Up:**
| When a player gains a level in the game. In game types Brawl, you will find 9 events at the exact same time.
**BuyItem:**
| When a player buys an item.
**SellItem:**
| When a player sells an item. ``json { "time": "2017-03-31T02:49:37+0000", "type": "SellItem", "payload": { "Team": "Left", "Actor": "*Lyra*", "Item": "Flare", "Cost": 15 } }``
**LearnAbility:**
| When a player puts a point into one of the abilities. Please note there can be a time difference between when a player gains a level and learns an ability ``json { "time": "2017-03-17T00:38:52+0000", "type": "LearnAbility", "payload": { "Team": "Right", "Actor": "*Sayoc*", "Ability": "HERO_ABILITY_SAYOC_C", "Level": 1 } },``
**UseAbility:**
| This event is recorded when a player uses an ability and it will hold information about the hero who used it together with the co-ordinates for the map. ``json { "time": "2017-03-17T00:39:08+0000", "type": "UseAbility", "payload": { "Team": "Right", "Actor": "*Kestrel*", "Ability": "HERO_ABILITY_KESTREL_A_NAME", "Position": [ 39.39, 0.01, 27.26 ] } },``
**UseItemAbility:**
| This event is recorded when a player uses an activatable item or a charm/taunt. ``json { "time": "2017-03-31T03:10:17+0000", "type": "UseItemAbility", "payload": { "Team": "Left", "Actor": "*Lyra*", "Ability": "Travel Boots", "Position": [ -17.51, 0.01, 41.63 ], "TargetActor": "None", "TargetPosition": [ -17.51, 0.01, 41.63 ] } }``
**EarnXP:**
| This event is recorded when a player gains XP from any source. it could be killing a minion, miner or a hero. ``json { "time": "2017-03-17T00:39:09+0000", "type": "EarnXP", "payload": { "Team": "Left", "Actor": "*Koshka*", "Source": "*JungleMinion_TreeEnt*", "Amount": 67, "Shared With": 1 } },``
**DealDamage:**
| This event is recorded when any actor (player, turret, minion, etc.) deals damage to any other. ``json { "time": "2017-03-31T02:47:34+0000", "type": "DealDamage", "payload": { "Team": "Left", "Actor": "*Skaarf*", "Target": "*Vox*", "Source": "Unknown", "Damage": 105, "Delt": 80, "IsHero": 1, "TargetIsHero": 1 } }``
**KillActor:**
| This event is recorded when a player kills anything in game. it could be a a minion, miner or a hero. You will generally see EarnXP and KillActor events come at the sme time.
**NPCkillNPC:**
| When one non-player actor kills another, such as the Kraken or a minion killing a turret. ``json { "time": "2017-03-31T03:07:21+0000", "type": "NPCkillNPC", "payload": { "Team": "Left", "Actor": "*Kraken_Captured*", "Killed": "*Turret*", "KilledTeam": "Right", "Gold": "300", "IsHero": 0, "TargetIsHero": 0, "Position": [ 54, 0, 2.92 ] } }``
**GoldFromTowerKill:**
| When a player earns gold from the destruction of a turret belonging to the enemy team. ``json { "time": "2017-03-31T02:57:02+0000", "type": "GoldFromTowerKill", "payload": { "Team": "Left", "Actor": "*Idris*", "Amount": 300 } }``
**GoldFromGoldMine:**
| When a player earns gold from his or her team capturing the gold miner. ``json { "time": "2017-03-31T03:00:43+0000", "type": "GoldFromGoldMine", "payload": { "Team": "Left", "Actor": "*Idris*", "Amount": 300 } }``
**GoldFromKrakenKill:**
| When a player earns gold from his or her team killing a Kraken released by the enemy team. ``json { "time": "2017-03-31T03:07:43+0000", "type": "GoldFromKrakenKill", "payload": { "Team": "Right", "Actor": "*Kestrel*", "Amount": 500 } }``
**Javascript:**
.. code-block:: Javascript
{
"time": "2017-03-17T00:38:32+0000",
"type": "PlayerFirstSpawn",
"payload": {
"Team": "Right",
"Actor": "*Alpha*"
}
}
{
"time": "2017-03-17T00:38:32+0000",
"type": "LevelUp",
"payload": {
"Team": "Right",
"Actor": "*Alpha*",
"Level": 1,
"LifetimeGold": 0
}
}
{
"time": "2017-03-17T00:38:45+0000",
"type": "BuyItem",
"payload": {
"Team": "Left",
"Actor": "*Vox*",
"Item": "Breaking Point",
"Cost": 2600
}
}
.. toctree::
:maxdepth: 2
|