Skip to content

Commit ec3f2fa

Browse files
committed
Adopts GraphQL for script execution
Removes legacy REST calls to unify script handling Adds open range assessment script for demonstration Improves maintainability and consistency
1 parent 093386b commit ec3f2fa

File tree

3 files changed

+393
-23
lines changed

3 files changed

+393
-23
lines changed

examples/testy.json

Lines changed: 367 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,367 @@
1+
{
2+
"id": "fb811021-3588-47ea-a1ba-7c43c15cc463-open-range-script",
3+
"startMode": "Overwrite",
4+
"endMode": "Wait",
5+
"activities": [
6+
{
7+
"nodeType": "RangeAnalysisScriptedActivity",
8+
"id": "fb811021-3588-47ea-a1ba-7c43c15cc463-open-range-1",
9+
"introMessage": {
10+
"header": "Open Range Assessment",
11+
"description": "You will be hitting 3 shots with 4 different clubs",
12+
"seconds": 3
13+
},
14+
"endMessage": {
15+
"header": "Great Job!",
16+
"description": "You have completed the open range assessment. We will now analyze your data and generate your personalized under load assessment.",
17+
"seconds": 3
18+
},
19+
"steps": [
20+
{
21+
"nodeType": "RangeAnalysisScriptedStep",
22+
"id": "fb811021-3588-47ea-a1ba-7c43c15cc463-open-range-step-1",
23+
"introMessage": {
24+
"header": "Open Range - Pitching Wedge",
25+
"description": "Hit 3 shots with your Pitching Wedge.",
26+
"seconds": 7
27+
},
28+
"successMessage": {
29+
"header": "Great Job!",
30+
"description": "You have completed the open range swings for Pitching Wedge.",
31+
"seconds": 3
32+
},
33+
"failMessage": {
34+
"header": "Failed",
35+
"description": "",
36+
"seconds": 3
37+
},
38+
"logic": {
39+
"nodeType": "RangeAnalysisScriptedLogic",
40+
"setup": {
41+
"nodeType": "RangeAnalysisScriptedSetup",
42+
"club": "_PW",
43+
"distance": 100
44+
},
45+
"successCondition": {
46+
"nodeType": "RangeAnalysisScriptedConditions",
47+
"shots": 3
48+
},
49+
"skipOnSuccess": true
50+
},
51+
"ui": {
52+
"nodeType": "RangeAnalysisScriptedUI",
53+
"activeDataTiles": [
54+
"Total",
55+
"Carry",
56+
"ClubSpeed",
57+
"BallSpeed",
58+
"AttackAngle"
59+
],
60+
"shotListParameters": [
61+
"Total",
62+
"Carry",
63+
"ClubSpeed",
64+
"BallSpeed"
65+
],
66+
"defaultShotListParameter": "Total",
67+
"beforeShot": {
68+
"removeFrames": [
69+
"Player",
70+
"StrokesGainedSummaryTile",
71+
"StrokesGainedShotResult",
72+
"TargetCarry"
73+
],
74+
"disableFrames": [
75+
"Tiles",
76+
"ShotList",
77+
"GoToSetup",
78+
"Minimap"
79+
],
80+
"addFrames": []
81+
},
82+
"duringShot": {
83+
"removeFrames": [
84+
"LandingCamera",
85+
"BroadcastTiles",
86+
"GoToSetup",
87+
"ClubDelivery",
88+
"Tiles",
89+
"Player",
90+
"Minimap"
91+
],
92+
"disableFrames": [],
93+
"addFrames": []
94+
},
95+
"afterShot": {
96+
"removeFrames": [
97+
"GoToSetup",
98+
"StrokesGainedSummaryTile",
99+
"StrokesGainedShotResult"
100+
],
101+
"disableFrames": [],
102+
"addFrames": []
103+
}
104+
}
105+
},
106+
{
107+
"nodeType": "RangeAnalysisScriptedStep",
108+
"id": "fb811021-3588-47ea-a1ba-7c43c15cc463-open-range-step-2",
109+
"introMessage": {
110+
"header": "Open Range - 7 Iron",
111+
"description": "Hit 3 shots with your 7 Iron.",
112+
"seconds": 7
113+
},
114+
"successMessage": {
115+
"header": "Great Job!",
116+
"description": "You have completed the open range swings for 7 Iron.",
117+
"seconds": 3
118+
},
119+
"failMessage": {
120+
"header": "Failed",
121+
"description": "",
122+
"seconds": 3
123+
},
124+
"logic": {
125+
"nodeType": "RangeAnalysisScriptedLogic",
126+
"setup": {
127+
"nodeType": "RangeAnalysisScriptedSetup",
128+
"club": "_7I",
129+
"distance": 100
130+
},
131+
"successCondition": {
132+
"nodeType": "RangeAnalysisScriptedConditions",
133+
"shots": 3
134+
},
135+
"skipOnSuccess": true
136+
},
137+
"ui": {
138+
"nodeType": "RangeAnalysisScriptedUI",
139+
"activeDataTiles": [
140+
"Total",
141+
"Carry",
142+
"ClubSpeed",
143+
"BallSpeed",
144+
"AttackAngle"
145+
],
146+
"shotListParameters": [
147+
"Total",
148+
"Carry",
149+
"ClubSpeed",
150+
"BallSpeed"
151+
],
152+
"defaultShotListParameter": "Total",
153+
"beforeShot": {
154+
"removeFrames": [
155+
"Player",
156+
"StrokesGainedSummaryTile",
157+
"StrokesGainedShotResult",
158+
"TargetCarry"
159+
],
160+
"disableFrames": [
161+
"Tiles",
162+
"ShotList",
163+
"GoToSetup",
164+
"Minimap"
165+
],
166+
"addFrames": []
167+
},
168+
"duringShot": {
169+
"removeFrames": [
170+
"LandingCamera",
171+
"BroadcastTiles",
172+
"GoToSetup",
173+
"ClubDelivery",
174+
"Tiles",
175+
"Player",
176+
"Minimap"
177+
],
178+
"disableFrames": [],
179+
"addFrames": []
180+
},
181+
"afterShot": {
182+
"removeFrames": [
183+
"GoToSetup",
184+
"StrokesGainedSummaryTile",
185+
"StrokesGainedShotResult"
186+
],
187+
"disableFrames": [],
188+
"addFrames": []
189+
}
190+
}
191+
},
192+
{
193+
"nodeType": "RangeAnalysisScriptedStep",
194+
"id": "fb811021-3588-47ea-a1ba-7c43c15cc463-open-range-step-3",
195+
"introMessage": {
196+
"header": "Open Range - 4 Hybrid",
197+
"description": "Hit 3 shots with your 4 Hybrid.",
198+
"seconds": 7
199+
},
200+
"successMessage": {
201+
"header": "Great Job!",
202+
"description": "You have completed the open range swings for 4 Hybrid.",
203+
"seconds": 3
204+
},
205+
"failMessage": {
206+
"header": "Failed",
207+
"description": "",
208+
"seconds": 3
209+
},
210+
"logic": {
211+
"nodeType": "RangeAnalysisScriptedLogic",
212+
"setup": {
213+
"nodeType": "RangeAnalysisScriptedSetup",
214+
"club": "_4H",
215+
"distance": 130
216+
},
217+
"successCondition": {
218+
"nodeType": "RangeAnalysisScriptedConditions",
219+
"shots": 3
220+
},
221+
"skipOnSuccess": true
222+
},
223+
"ui": {
224+
"nodeType": "RangeAnalysisScriptedUI",
225+
"activeDataTiles": [
226+
"Total",
227+
"Carry",
228+
"ClubSpeed",
229+
"BallSpeed",
230+
"AttackAngle"
231+
],
232+
"shotListParameters": [
233+
"Total",
234+
"Carry",
235+
"ClubSpeed",
236+
"BallSpeed"
237+
],
238+
"defaultShotListParameter": "Total",
239+
"beforeShot": {
240+
"removeFrames": [
241+
"Player",
242+
"StrokesGainedSummaryTile",
243+
"StrokesGainedShotResult",
244+
"TargetCarry"
245+
],
246+
"disableFrames": [
247+
"Tiles",
248+
"ShotList",
249+
"GoToSetup",
250+
"Minimap"
251+
],
252+
"addFrames": []
253+
},
254+
"duringShot": {
255+
"removeFrames": [
256+
"LandingCamera",
257+
"BroadcastTiles",
258+
"GoToSetup",
259+
"ClubDelivery",
260+
"Tiles",
261+
"Player",
262+
"Minimap"
263+
],
264+
"disableFrames": [],
265+
"addFrames": []
266+
},
267+
"afterShot": {
268+
"removeFrames": [
269+
"GoToSetup",
270+
"StrokesGainedSummaryTile",
271+
"StrokesGainedShotResult"
272+
],
273+
"disableFrames": [],
274+
"addFrames": []
275+
}
276+
}
277+
},
278+
{
279+
"nodeType": "RangeAnalysisScriptedStep",
280+
"id": "fb811021-3588-47ea-a1ba-7c43c15cc463-open-range-step-4",
281+
"introMessage": {
282+
"header": "Open Range - Driver",
283+
"description": "Hit 3 shots with your Driver.",
284+
"seconds": 7
285+
},
286+
"successMessage": {
287+
"header": "Great Job!",
288+
"description": "You have completed the open range swings for Driver.",
289+
"seconds": 3
290+
},
291+
"failMessage": {
292+
"header": "Failed",
293+
"description": "",
294+
"seconds": 3
295+
},
296+
"logic": {
297+
"nodeType": "RangeAnalysisScriptedLogic",
298+
"setup": {
299+
"nodeType": "RangeAnalysisScriptedSetup",
300+
"club": "Drv",
301+
"distance": 200
302+
},
303+
"successCondition": {
304+
"nodeType": "RangeAnalysisScriptedConditions",
305+
"shots": 3
306+
},
307+
"skipOnSuccess": true
308+
},
309+
"ui": {
310+
"nodeType": "RangeAnalysisScriptedUI",
311+
"activeDataTiles": [
312+
"Total",
313+
"Carry",
314+
"ClubSpeed",
315+
"BallSpeed",
316+
"AttackAngle"
317+
],
318+
"shotListParameters": [
319+
"Total",
320+
"Carry",
321+
"ClubSpeed",
322+
"BallSpeed"
323+
],
324+
"defaultShotListParameter": "Total",
325+
"beforeShot": {
326+
"removeFrames": [
327+
"Player",
328+
"StrokesGainedSummaryTile",
329+
"StrokesGainedShotResult",
330+
"TargetCarry"
331+
],
332+
"disableFrames": [
333+
"Tiles",
334+
"ShotList",
335+
"GoToSetup",
336+
"Minimap"
337+
],
338+
"addFrames": []
339+
},
340+
"duringShot": {
341+
"removeFrames": [
342+
"LandingCamera",
343+
"BroadcastTiles",
344+
"GoToSetup",
345+
"ClubDelivery",
346+
"Tiles",
347+
"Player",
348+
"Minimap"
349+
],
350+
"disableFrames": [],
351+
"addFrames": []
352+
},
353+
"afterShot": {
354+
"removeFrames": [
355+
"GoToSetup",
356+
"StrokesGainedSummaryTile",
357+
"StrokesGainedShotResult"
358+
],
359+
"disableFrames": [],
360+
"addFrames": []
361+
}
362+
}
363+
}
364+
]
365+
}
366+
]
367+
}

0 commit comments

Comments
 (0)