-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathutil.json
301 lines (301 loc) · 13.7 KB
/
util.json
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
{
"boards": {
"current": {
"pokemonOptions": [{
"label": "None",
"value": "None"
}, {
"label": "Total Pokemon",
"value": "current_total_pokemon"
},
{
"label": "Total IV",
"value": "current_iv_pokemon"
},
{
"label": "Average IV",
"value": "current_avg_iv"
},
{
"label": "Hundos",
"value": "current_100s"
},
{
"label": "Nundos",
"value": "current_0s"
},
{
"label": "Shinies",
"value": "current_shinies"
}
],
"gymOptions": [{
"label": "None",
"value": "None"
}, {
"label": "Gyms",
"value": "current_total_gyms"
},
{
"label": "Battling",
"value": "current_battling"
},
{
"label": "Gym Teams",
"value": "current_gym_teams"
},
{
"label": "Raids",
"value": "current_total_raids"
},
{
"label": "Raid Tiers",
"value": "current_raid_tiers"
},
{
"label": "Eggs",
"value": "current_total_eggs"
},
{
"label": "Egg Tiers",
"value": "current_egg_tiers"
}
],
"pokestopOptions": [{
"label": "None",
"value": "None"
}, {
"label": "Pokestops",
"value": "current_total_pokestops"
},
{
"label": "Quests",
"value": "current_total_quests"
},
{
"label": "Lures",
"value": "current_total_lures"
},
{
"label": "Lure Types",
"value": "current_lure_types"
},
{
"label": "Grunts",
"value": "current_total_grunts"
},
{
"label": "Leaders",
"value": "current_total_leaders"
},
{
"label": "Leader Names",
"value": "current_leader_names"
}
],
"updateIntervals": [{
"label": "Every 5 Minutes",
"value": "*/5 * * * *"
},
{
"label": "Every 10 Minutes",
"value": "*/10 * * * *"
},
{
"label": "Every 15 Minutes",
"value": "*/15 * * * *"
},
{
"label": "Every 30 Minutes",
"value": "*/30 * * * *"
},
{
"label": "Every 60 Minutes",
"value": "*/60 * * * *"
}
]
},
"history": {
"historyOptions": [{
"label": "Total Pokemon",
"value": "history_pokemon"
},
{
"label": "Total IV Scanned",
"value": "history_iv_pokemon"
},
{
"label": "Total Hundos",
"value": "history_hundos"
},
{
"label": "Total Shinies",
"value": "history_shinies"
},
{
"label": "Total Invasions",
"value": "history_invasions"
},
{
"label": "Total Quests",
"value": "history_quests"
}
],
"updateIntervals": [{
"label": "Yesterday",
"value": "1 Day"
}, {
"label": "The Last 2 Days",
"value": "2 Day"
}, {
"label": "The Last 3 Days",
"value": "3 Day"
}, {
"label": "The Last 5 Days",
"value": "5 Day"
}, {
"label": "The Last Week",
"value": "1 Week"
}, {
"label": "The Last 2 Weeks",
"value": "2 Week"
}, {
"label": "The Last Month",
"value": "1 Month"
}, {
"label": "The Last 2 Months",
"value": "2 Month"
}, {
"label": "The Last 3 Months",
"value": "3 Month"
}, {
"label": "The Last 6 Months",
"value": "6 Month"
}, {
"label": "The Last Year",
"value": "1 Year"
}, {
"label": "The Last 2 Years",
"value": "2 Year"
}, {
"label": "The Last 3 Years",
"value": "3 Year"
}, {
"label": "Total History",
"value": "99 Year"
}]
}
},
"queries": {
"current_total_pokemon": {
"label": "{{pokemon}} Pokemon",
"query": "SELECT count(*) as {{queryName}} FROM pokemon WHERE id IS NOT NULL AND expire_timestamp >= UNIX_TIMESTAMP() AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokemon.lat, pokemon.lon));"
},
"current_iv_pokemon": {
"label": "{{iv}} With IV",
"query": "SELECT count(*) as {{queryName}} FROM pokemon WHERE id IS NOT NULL AND cp IS NOT NULL AND expire_timestamp >= UNIX_TIMESTAMP() AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokemon.lat, pokemon.lon));"
},
"current_avg_iv": {
"label": "{{average}} Average",
"query": "SELECT AVG(iv) as {{queryName}} FROM pokemon WHERE iv IS NOT null AND expire_timestamp >= UNIX_TIMESTAMP() AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokemon.lat, pokemon.lon));"
},
"current_100s": {
"label": "{{hundos}} Hundos",
"query": "SELECT count(*) as {{queryName}} FROM pokemon WHERE iv = 100 AND expire_timestamp >= UNIX_TIMESTAMP() AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokemon.lat, pokemon.lon));"
},
"current_0s": {
"label": "{{nundos}} Nundos",
"query": "SELECT count(*) as {{queryName}} FROM pokemon WHERE iv = 0 AND expire_timestamp >= UNIX_TIMESTAMP() AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokemon.lat, pokemon.lon));"
},
"current_shinies": {
"label": "{{shinies}} Shinies",
"query": "SELECT count(*) as {{queryName}} FROM pokemon WHERE shiny = 1 AND expire_timestamp >= UNIX_TIMESTAMP() AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokemon.lat, pokemon.lon));"
},
"current_total_gyms": {
"label": "{{gyms}} Gyms",
"query": "SELECT count(*) as {{queryName}} FROM gym WHERE ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(gym.lat, gym.lon));"
},
"current_gym_teams": {
"label": "{{gyms}} Gyms",
"query": "SELECT `Mystic`, `Valor`, `Instinct`, `Neutral` FROM (SELECT COUNT(CASE WHEN team_id = 1 THEN 1 END) AS `Mystic`, COUNT(CASE WHEN team_id = 2 THEN 1 END) AS `Valor`, COUNT(CASE WHEN team_id = 3 THEN 1 END) AS `Instinct`, COUNT(CASE WHEN team_id = 0 THEN 1 END) AS `Neutral` FROM gym WHERE ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(gym.lat, gym.lon)))AS latte;"
},
"current_battling": {
"label": "{{battling}} Battling",
"query": "SELECT count(*) as {{queryName}} FROM gym WHERE in_battle = 1 AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(gym.lat, gym.lon));"
},
"current_total_raids": {
"label": "{{raids}} Raids",
"query": "SELECT count(*) as {{queryName}} FROM gym WHERE UNIX_TIMESTAMP() <= raid_end_timestamp AND UNIX_TIMESTAMP() >= raid_battle_timestamp AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(gym.lat, gym.lon));"
},
"current_raid_tiers": {
"label": "{{raids}} Raids",
"query": "SELECT `tier_1`, `tier_2`, `tier_3`, `tier_4`, `tier_5`, `tier_6`, `tier_7`, `tier_8` FROM (SELECT COUNT(CASE WHEN raid_level = 1 THEN 1 END) AS `tier_1`, COUNT(CASE WHEN raid_level = 2 THEN 1 END) AS `tier_2`, COUNT(CASE WHEN raid_level = 3 THEN 1 END) AS `tier_3`, COUNT(CASE WHEN raid_level = 4 THEN 1 END) AS `tier_4`, COUNT(CASE WHEN raid_level = 5 THEN 1 END) AS `tier_5`, COUNT(CASE WHEN raid_level = 6 THEN 1 END) AS `tier_6`, COUNT(CASE WHEN raid_level = 7 THEN 1 END) AS `tier_7`, COUNT(CASE WHEN raid_level = 8 THEN 1 END) AS `tier_8` FROM gym WHERE UNIX_TIMESTAMP() < raid_end_timestamp AND UNIX_TIMESTAMP() > raid_battle_timestamp AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(gym.lat, gym.lon)))AS latte;"
},
"current_total_eggs": {
"label": "{{eggs}} Eggs",
"query": "SELECT count(*) as {{queryName}} FROM gym WHERE UNIX_TIMESTAMP() >= raid_spawn_timestamp AND UNIX_TIMESTAMP() <= raid_battle_timestamp AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(gym.lat, gym.lon));"
},
"current_egg_tiers": {
"label": "{{eggs}} Eggs",
"query": "SELECT `tier_1`, `tier_2`, `tier_3`, `tier_4`, `tier_5`, `tier_6`, `tier_7`, `tier_8` FROM (SELECT COUNT(CASE WHEN raid_level = 1 THEN 1 END) AS `tier_1`, COUNT(CASE WHEN raid_level = 2 THEN 1 END) AS `tier_2`, COUNT(CASE WHEN raid_level = 3 THEN 1 END) AS `tier_3`, COUNT(CASE WHEN raid_level = 4 THEN 1 END) AS `tier_4`, COUNT(CASE WHEN raid_level = 5 THEN 1 END) AS `tier_5`, COUNT(CASE WHEN raid_level = 6 THEN 1 END) AS `tier_6`, COUNT(CASE WHEN raid_level = 7 THEN 1 END) AS `tier_7`, COUNT(CASE WHEN raid_level = 8 THEN 1 END) AS `tier_8` FROM gym WHERE UNIX_TIMESTAMP() < raid_battle_timestamp AND UNIX_TIMESTAMP() > raid_spawn_timestamp AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(gym.lat, gym.lon)))AS latte;"
},
"current_total_pokestops": {
"label": "{{pokestops}} Pokestops",
"query": "SELECT count(*) as {{queryName}} from pokestop WHERE ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokestop.lat, pokestop.lon));"
},
"current_total_quests": {
"label": "{{quests}} Quests",
"query": "SELECT COUNT(CASE WHEN quest_conditions IS NOT null THEN 1 END) AS ar, COUNT(CASE WHEN alternative_quest_conditions IS NOT null THEN 1 END) AS non_ar FROM pokestop WHERE ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokestop.lat, pokestop.lon));"
},
"current_total_lures": {
"label": "{{lures}} Lures",
"query": "SELECT count(*) as {{queryName}} FROM pokestop WHERE UNIX_TIMESTAMP() <= lure_expire_timestamp AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokestop.lat, pokestop.lon));"
},
"current_lure_types": {
"label": "Lures",
"query": "SELECT `normal`, `glacial`, `mossy`, `magnetic`, `rainy` FROM (SELECT COUNT(CASE WHEN lure_id = 501 THEN 1 END) AS `normal`, COUNT(CASE WHEN lure_id = 502 THEN 1 END) AS `glacial`, COUNT(CASE WHEN lure_id = 503 THEN 1 END) AS `mossy`, COUNT(CASE WHEN lure_id = 504 THEN 1 END) AS `magnetic`, COUNT(CASE WHEN lure_id = 505 THEN 1 END) AS `rainy` FROM pokestop WHERE UNIX_TIMESTAMP() < lure_expire_timestamp AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(pokestop.lat, pokestop.lon)))AS latte;"
},
"current_total_grunts": {
"label": "{{grunts}} Grunts",
"query": "SELECT count(*) FROM incident a, pokestop b WHERE a.pokestop_id = b.id AND UNIX_TIMESTAMP() < a.expiration AND a.character NOT IN ('41','42','43','44') AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(b.lat, b.lon));"
},
"current_total_leaders": {
"label": "{{leaders}} Leaders",
"query": "SELECT count(*) FROM incident a, pokestop b WHERE a.pokestop_id = b.id AND UNIX_TIMESTAMP() < a.expiration AND a.character IN ('41','42','43','44') AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(b.lat, b.lon));"
},
"current_leader_names": {
"label": "Leaders",
"query": "SELECT a.character, count(*) FROM incident a, pokestop b WHERE a.pokestop_id = b.id AND UNIX_TIMESTAMP() < a.expiration AND a.character IN ('41','42','43','44') AND ST_CONTAINS(ST_GEOMFROMTEXT('POLYGON({{area}})'), point(b.lat, b.lon)) group by a.character;"
},
"history_pokemon": {
"label": "{{pokemon}} Pokemon",
"query": "SELECT SUM(count) FROM pokemon_stats WHERE DATE(date) > curdate() - interval {{interval}} - interval 1 day AND DATE(date) != curdate();"
},
"history_iv_pokemon": {
"label": "{{iv}} With IV",
"query": "SELECT SUM(count) FROM pokemon_iv_stats WHERE DATE(date) > curdate() - interval {{interval}} - interval 1 day AND DATE(date) != curdate();"
},
"history_hundos": {
"label": "{{hundos}} Hundos",
"query": "SELECT SUM(count) FROM pokemon_hundo_stats WHERE DATE(date) > curdate() - interval {{interval}} - interval 1 day AND DATE(date) != curdate();"
},
"history_shinies": {
"label": "{{shinies}} Shinies",
"query": "SELECT SUM(count) FROM pokemon_shiny_stats WHERE DATE(date) > curdate() - interval {{interval}} - interval 1 day AND DATE(date) != curdate();"
},
"history_invasions": {
"label": "{{grunts}} Invasions",
"query": "SELECT SUM(count) FROM invasion_stats WHERE DATE(date) > curdate() - interval {{interval}} - interval 1 day AND DATE(date) != curdate();"
},
"history_quests": {
"label": "{{quests}} Quests",
"query": "SELECT SUM(count) FROM quest_stats WHERE DATE(date) > curdate() - interval {{interval}} - interval 1 day AND DATE(date) != curdate();"
}
},
"protos": {
"41": "Cliff",
"42": "Arlo",
"43": "Sierra",
"44": "Giovanni"
}
}