@oasisomniverse/web5-api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +250 -0
  2. package/docs/README.md +44 -0
  3. package/docs/modules/Avatar.md +606 -0
  4. package/docs/modules/CelestialBodies.md +1051 -0
  5. package/docs/modules/CelestialBodiesMetaData.md +949 -0
  6. package/docs/modules/CelestialSpaces.md +1051 -0
  7. package/docs/modules/Chapters.md +955 -0
  8. package/docs/modules/Competition.md +594 -0
  9. package/docs/modules/Cosmic.md +3653 -0
  10. package/docs/modules/Games.md +2619 -0
  11. package/docs/modules/GeoHotSpots.md +1027 -0
  12. package/docs/modules/GeoNFTs.md +1049 -0
  13. package/docs/modules/Health.md +90 -0
  14. package/docs/modules/Holons.md +1139 -0
  15. package/docs/modules/HolonsMetaData.md +949 -0
  16. package/docs/modules/InventoryItems.md +1071 -0
  17. package/docs/modules/Libraries.md +1052 -0
  18. package/docs/modules/Missions.md +1286 -0
  19. package/docs/modules/NFTs.md +1008 -0
  20. package/docs/modules/OAPPs.md +1190 -0
  21. package/docs/modules/Parks.md +1079 -0
  22. package/docs/modules/Plugins.md +1138 -0
  23. package/docs/modules/Quests.md +1941 -0
  24. package/docs/modules/Runtimes.md +1112 -0
  25. package/docs/modules/STAR.md +178 -0
  26. package/docs/modules/Templates.md +990 -0
  27. package/docs/modules/Zomes.md +1049 -0
  28. package/docs/modules/ZomesMetaData.md +949 -0
  29. package/index.d.ts +97 -0
  30. package/index.js +3 -0
  31. package/index.mjs +4 -0
  32. package/package.json +117 -0
  33. package/src/core/httpClient.js +110 -0
  34. package/src/core/routeHelper.js +85 -0
  35. package/src/core/tokenStore.js +52 -0
  36. package/src/core/types.d.ts +18 -0
  37. package/src/index.js +60 -0
  38. package/src/modules/Auth.d.ts +15 -0
  39. package/src/modules/Auth.js +62 -0
  40. package/src/modules/Avatar.d.ts +45 -0
  41. package/src/modules/Avatar.js +47 -0
  42. package/src/modules/CelestialBodies.d.ts +72 -0
  43. package/src/modules/CelestialBodies.js +65 -0
  44. package/src/modules/CelestialBodiesMetaData.d.ts +69 -0
  45. package/src/modules/CelestialBodiesMetaData.js +61 -0
  46. package/src/modules/CelestialSpaces.d.ts +72 -0
  47. package/src/modules/CelestialSpaces.js +65 -0
  48. package/src/modules/Chapters.d.ts +66 -0
  49. package/src/modules/Chapters.js +61 -0
  50. package/src/modules/Competition.d.ts +33 -0
  51. package/src/modules/Competition.js +39 -0
  52. package/src/modules/Cosmic.d.ts +222 -0
  53. package/src/modules/Cosmic.js +165 -0
  54. package/src/modules/Games.d.ts +171 -0
  55. package/src/modules/Games.js +131 -0
  56. package/src/modules/GeoHotSpots.d.ts +66 -0
  57. package/src/modules/GeoHotSpots.js +61 -0
  58. package/src/modules/GeoNFTs.d.ts +72 -0
  59. package/src/modules/GeoNFTs.js +65 -0
  60. package/src/modules/Health.d.ts +12 -0
  61. package/src/modules/Health.js +25 -0
  62. package/src/modules/Holons.d.ts +78 -0
  63. package/src/modules/Holons.js +69 -0
  64. package/src/modules/HolonsMetaData.d.ts +69 -0
  65. package/src/modules/HolonsMetaData.js +61 -0
  66. package/src/modules/InventoryItems.d.ts +69 -0
  67. package/src/modules/InventoryItems.js +63 -0
  68. package/src/modules/Libraries.d.ts +72 -0
  69. package/src/modules/Libraries.js +65 -0
  70. package/src/modules/Missions.d.ts +87 -0
  71. package/src/modules/Missions.js +75 -0
  72. package/src/modules/NFTs.d.ts +69 -0
  73. package/src/modules/NFTs.js +63 -0
  74. package/src/modules/OAPPs.d.ts +69 -0
  75. package/src/modules/OAPPs.js +61 -0
  76. package/src/modules/Parks.d.ts +72 -0
  77. package/src/modules/Parks.js +65 -0
  78. package/src/modules/Plugins.d.ts +78 -0
  79. package/src/modules/Plugins.js +69 -0
  80. package/src/modules/Quests.d.ts +129 -0
  81. package/src/modules/Quests.js +101 -0
  82. package/src/modules/Runtimes.d.ts +81 -0
  83. package/src/modules/Runtimes.js +69 -0
  84. package/src/modules/STAR.d.ts +18 -0
  85. package/src/modules/STAR.js +29 -0
  86. package/src/modules/Templates.d.ts +72 -0
  87. package/src/modules/Templates.js +63 -0
  88. package/src/modules/Zomes.d.ts +72 -0
  89. package/src/modules/Zomes.js +65 -0
  90. package/src/modules/ZomesMetaData.d.ts +69 -0
  91. package/src/modules/ZomesMetaData.js +61 -0
  92. package/src/modules/index.js +67 -0
@@ -0,0 +1,2619 @@
1
+ # Games — `star.games`
2
+
3
+ Source controller: [`GamesController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/GamesController.cs)
4
+ Route prefix: `api/games`
5
+ 55 operation(s).
6
+
7
+ Every method takes a single args object: any key matching a `{token}` in the route is substituted into the URL; everything else becomes the query string (GET/DELETE) or JSON body (POST/PUT). Every call resolves to the standard OASIS envelope:
8
+
9
+ ```ts
10
+ {
11
+ isError: boolean;
12
+ isWarning: boolean;
13
+ message: string;
14
+ errorCode?: string;
15
+ result: T; // see each endpoint's Response section below
16
+ }
17
+ ```
18
+
19
+ ## Operations
20
+
21
+ ### `activateGame`
22
+
23
+ Activates a game.
24
+
25
+ **POST** `api/games/{id}/activate`
26
+
27
+ Route parameters:
28
+
29
+ | Field | Type |
30
+ | --- | --- |
31
+ | `id` | `Guid` |
32
+
33
+ **Request**
34
+
35
+ Body fields:
36
+
37
+ | Field | Type |
38
+ | --- | --- |
39
+ | `version` | `int (optional)` |
40
+
41
+ **Response**
42
+
43
+ Standard `OASISResult` envelope (see top of this page) with:
44
+
45
+ `result` type: `IActionResult` (not part of the request/response payload).
46
+
47
+ **Example**
48
+
49
+ ```js
50
+ const { isError, message, result } = await star.games.activateGame({
51
+ id: '<id>',
52
+ version: 1
53
+ });
54
+ if (isError) throw new Error(message);
55
+ console.log(result);
56
+ ```
57
+
58
+ Example response:
59
+
60
+ ```json
61
+ {
62
+ "isError": false,
63
+ "message": "",
64
+ "result": null
65
+ }
66
+ ```
67
+
68
+ ---
69
+
70
+ ### `addItemToInventory`
71
+
72
+ Adds an item to the avatar's shared inventory (can be used across all games, apps, websites, services)
73
+
74
+ **POST** `api/games/shared-inventory/add`
75
+
76
+ **Request**
77
+
78
+ Body type: `InventoryItem`
79
+
80
+ | Field | Type |
81
+ | --- | --- |
82
+ | `Image2D` | `byte[]` |
83
+ | `Image2DURI` | `Uri` |
84
+ | `ThumbnailUrl` | `string` |
85
+ | `Object3D` | `byte[]` |
86
+ | `Object3DURI` | `Uri` |
87
+ | `Quantity` | `int` |
88
+ | `Stack` | `bool` |
89
+ | `GameSource` | `string` |
90
+ | `ItemType` | `string` |
91
+ | `NftId` | `string` |
92
+ | `InventoryItemType` | `InventoryItemType` |
93
+ | `Rarity` | `string` |
94
+ | `MaxQuantity` | `int` |
95
+ | `Weight` | `float` |
96
+ | `IsUsable` | `bool` |
97
+ | `IsTradeable` | `bool` |
98
+ | `OwnerAvatarId` | `string` |
99
+ | `AcquiredOn` | `DateTime` |
100
+ | `LastUsedOn` | `DateTime` |
101
+ | `Properties` | `Dictionary<string, object>` |
102
+
103
+ **Response**
104
+
105
+ Standard `OASISResult` envelope (see top of this page) with:
106
+
107
+ `result` type: `IActionResult` (not part of the request/response payload).
108
+
109
+ **Example**
110
+
111
+ ```js
112
+ const { isError, message, result } = await star.games.addItemToInventory({
113
+ image2D: "<base64-bytes>",
114
+ image2DURI: "https://example.com/asset.png",
115
+ thumbnailUrl: "example string",
116
+ object3D: "<base64-bytes>",
117
+ object3DURI: "https://example.com/asset.png",
118
+ quantity: 1,
119
+ stack: true,
120
+ gameSource: "example string",
121
+ itemType: "example string",
122
+ nftId: "example string",
123
+ inventoryItemType: { },
124
+ rarity: "example string",
125
+ maxQuantity: 1,
126
+ weight: 1.0,
127
+ isUsable: true,
128
+ isTradeable: true,
129
+ ownerAvatarId: "example string",
130
+ acquiredOn: "2026-01-01T00:00:00Z",
131
+ lastUsedOn: "2026-01-01T00:00:00Z",
132
+ properties: { "<string>": {} }
133
+ });
134
+ if (isError) throw new Error(message);
135
+ console.log(result);
136
+ ```
137
+
138
+ Example response:
139
+
140
+ ```json
141
+ {
142
+ "isError": false,
143
+ "message": "",
144
+ "result": null
145
+ }
146
+ ```
147
+
148
+ ---
149
+
150
+ ### `bindKeys`
151
+
152
+ Binds keys to actions
153
+
154
+ **POST** `api/games/{gameId}/input/bind-keys`
155
+
156
+ Route parameters:
157
+
158
+ | Field | Type |
159
+ | --- | --- |
160
+ | `gameId` | `Guid` |
161
+
162
+ **Request**
163
+
164
+ Body type: `Dictionary<string, string>` - a key/value map keyed by `string`, each value a `string`.
165
+
166
+ **Response**
167
+
168
+ Standard `OASISResult` envelope (see top of this page) with:
169
+
170
+ `result` type: `IActionResult` (not part of the request/response payload).
171
+
172
+ **Example**
173
+
174
+ ```js
175
+ const { isError, message, result } = await star.games.bindKeys({
176
+ gameId: '<gameId>',
177
+ /* ...request body fields */
178
+ });
179
+ if (isError) throw new Error(message);
180
+ console.log(result);
181
+ ```
182
+
183
+ Example response:
184
+
185
+ ```json
186
+ {
187
+ "isError": false,
188
+ "message": "",
189
+ "result": null
190
+ }
191
+ ```
192
+
193
+ ---
194
+
195
+ ### `cloneGame`
196
+
197
+ Clones an existing game.
198
+
199
+ **POST** `api/games/{id}/clone`
200
+
201
+ Route parameters:
202
+
203
+ | Field | Type |
204
+ | --- | --- |
205
+ | `id` | `Guid` |
206
+
207
+ **Request**
208
+
209
+ Body type: `CloneRequest`
210
+
211
+ | Field | Type |
212
+ | --- | --- |
213
+ | `NewName` | `string` |
214
+
215
+ **Response**
216
+
217
+ Standard `OASISResult` envelope (see top of this page) with:
218
+
219
+ `result` type: `IActionResult` (not part of the request/response payload).
220
+
221
+ **Example**
222
+
223
+ ```js
224
+ const { isError, message, result } = await star.games.cloneGame({
225
+ id: '<id>',
226
+ newName: "example string"
227
+ });
228
+ if (isError) throw new Error(message);
229
+ console.log(result);
230
+ ```
231
+
232
+ Example response:
233
+
234
+ ```json
235
+ {
236
+ "isError": false,
237
+ "message": "",
238
+ "result": null
239
+ }
240
+ ```
241
+
242
+ ---
243
+
244
+ ### `createGame`
245
+
246
+ Creates a new game for the authenticated avatar.
247
+
248
+ **POST** `api/games`
249
+
250
+ **Request**
251
+
252
+ Body type: `IGame`
253
+
254
+ | Field | Type |
255
+ | --- | --- |
256
+ | `GameType` | `GameType` |
257
+ | `Version` | `string` |
258
+ | `Developer` | `string` |
259
+ | `Publisher` | `string` |
260
+ | `ReleaseDate` | `DateTime` |
261
+ | `SupportedPlatforms` | `List<string>` |
262
+ | `SupportsCrossGameInterop` | `bool` |
263
+ | `GameSettings` | `Dictionary<string, object>` |
264
+
265
+ **Response**
266
+
267
+ Standard `OASISResult` envelope (see top of this page) with:
268
+
269
+ `result` type: `IActionResult` (not part of the request/response payload).
270
+
271
+ **Example**
272
+
273
+ ```js
274
+ const { isError, message, result } = await star.games.createGame({
275
+ gameType: { },
276
+ version: "example string",
277
+ developer: "example string",
278
+ publisher: "example string",
279
+ releaseDate: "2026-01-01T00:00:00Z",
280
+ supportedPlatforms: ["example string"],
281
+ supportsCrossGameInterop: true,
282
+ gameSettings: { "<string>": {} }
283
+ });
284
+ if (isError) throw new Error(message);
285
+ console.log(result);
286
+ ```
287
+
288
+ Example response:
289
+
290
+ ```json
291
+ {
292
+ "isError": false,
293
+ "message": "",
294
+ "result": null
295
+ }
296
+ ```
297
+
298
+ ---
299
+
300
+ ### `createGameWithOptions`
301
+
302
+ Creates a new game with specified parameters.
303
+
304
+ **POST** `api/games/create`
305
+
306
+ **Request**
307
+
308
+ Body type: `CreateGameRequest`
309
+
310
+ | Field | Type |
311
+ | --- | --- |
312
+ | `Name` | `string` |
313
+ | `Description` | `string` |
314
+ | `HolonSubType` | `HolonType` |
315
+ | `SourceFolderPath` | `string` |
316
+ | `CreateOptions` | `ISTARNETCreateOptions<Game, STARNETDNA>` |
317
+
318
+ **Response**
319
+
320
+ Standard `OASISResult` envelope (see top of this page) with:
321
+
322
+ `result` type: `IActionResult` (not part of the request/response payload).
323
+
324
+ **Example**
325
+
326
+ ```js
327
+ const { isError, message, result } = await star.games.createGameWithOptions({
328
+ name: "example string",
329
+ description: "example string",
330
+ holonSubType: { },
331
+ sourceFolderPath: "example string",
332
+ createOptions: { "STARNETHolon": /* <T1> */, "STARNETDNA": /* <T2> */, "MetaTagMappings": { "MetaHolonTags": [{ "HolonName": "example string", "HolonType": { }, "NodeName": "example string", "NodeType": { "Score": 1.0 }, "MetaTag": "example string" }], "MetaTags": { "<string>": "example string" } }, "CheckIfSourcePathExists": true, "CustomCreateParams": { "<string>": {} } }
333
+ });
334
+ if (isError) throw new Error(message);
335
+ console.log(result);
336
+ ```
337
+
338
+ Example response:
339
+
340
+ ```json
341
+ {
342
+ "isError": false,
343
+ "message": "",
344
+ "result": null
345
+ }
346
+ ```
347
+
348
+ ---
349
+
350
+ ### `deactivateGame`
351
+
352
+ Deactivates a game.
353
+
354
+ **POST** `api/games/{id}/deactivate`
355
+
356
+ Route parameters:
357
+
358
+ | Field | Type |
359
+ | --- | --- |
360
+ | `id` | `Guid` |
361
+
362
+ **Request**
363
+
364
+ Body fields:
365
+
366
+ | Field | Type |
367
+ | --- | --- |
368
+ | `version` | `int (optional)` |
369
+
370
+ **Response**
371
+
372
+ Standard `OASISResult` envelope (see top of this page) with:
373
+
374
+ `result` type: `IActionResult` (not part of the request/response payload).
375
+
376
+ **Example**
377
+
378
+ ```js
379
+ const { isError, message, result } = await star.games.deactivateGame({
380
+ id: '<id>',
381
+ version: 1
382
+ });
383
+ if (isError) throw new Error(message);
384
+ console.log(result);
385
+ ```
386
+
387
+ Example response:
388
+
389
+ ```json
390
+ {
391
+ "isError": false,
392
+ "message": "",
393
+ "result": null
394
+ }
395
+ ```
396
+
397
+ ---
398
+
399
+ ### `deleteGame`
400
+
401
+ Deletes a game.
402
+
403
+ **DELETE** `api/games/{id}`
404
+
405
+ Route parameters:
406
+
407
+ | Field | Type |
408
+ | --- | --- |
409
+ | `id` | `Guid` |
410
+
411
+ **Request**
412
+
413
+ No request body.
414
+
415
+ **Response**
416
+
417
+ Standard `OASISResult` envelope (see top of this page) with:
418
+
419
+ `result` type: `IActionResult` (not part of the request/response payload).
420
+
421
+ **Example**
422
+
423
+ ```js
424
+ const { isError, message, result } = await star.games.deleteGame({
425
+ id: '<id>'
426
+ });
427
+ if (isError) throw new Error(message);
428
+ console.log(result);
429
+ ```
430
+
431
+ Example response:
432
+
433
+ ```json
434
+ {
435
+ "isError": false,
436
+ "message": "",
437
+ "result": null
438
+ }
439
+ ```
440
+
441
+ ---
442
+
443
+ ### `downloadGame`
444
+
445
+ Downloads a game from the STARNET system.
446
+
447
+ **POST** `api/games/{id}/download`
448
+
449
+ Route parameters:
450
+
451
+ | Field | Type |
452
+ | --- | --- |
453
+ | `id` | `Guid` |
454
+
455
+ **Request**
456
+
457
+ Body fields:
458
+
459
+ | Field | Type |
460
+ | --- | --- |
461
+ | `version` | `int (optional)` |
462
+ | `downloadPath` | `string (optional)` |
463
+ | `reInstall` | `bool (optional)` |
464
+
465
+ **Response**
466
+
467
+ Standard `OASISResult` envelope (see top of this page) with:
468
+
469
+ `result` type: `IActionResult` (not part of the request/response payload).
470
+
471
+ **Example**
472
+
473
+ ```js
474
+ const { isError, message, result } = await star.games.downloadGame({
475
+ id: '<id>',
476
+ version: 1,
477
+ downloadPath: 'example string',
478
+ reInstall: true
479
+ });
480
+ if (isError) throw new Error(message);
481
+ console.log(result);
482
+ ```
483
+
484
+ Example response:
485
+
486
+ ```json
487
+ {
488
+ "isError": false,
489
+ "message": "",
490
+ "result": null
491
+ }
492
+ ```
493
+
494
+ ---
495
+
496
+ ### `editGame`
497
+
498
+ Edits a game with new DNA configuration.
499
+
500
+ **POST** `api/games/{id}/edit`
501
+
502
+ Route parameters:
503
+
504
+ | Field | Type |
505
+ | --- | --- |
506
+ | `id` | `Guid` |
507
+
508
+ **Request**
509
+
510
+ Body type: `EditGameRequest`
511
+
512
+ | Field | Type |
513
+ | --- | --- |
514
+ | `NewDNA` | `STARNETDNA` |
515
+
516
+ **Response**
517
+
518
+ Standard `OASISResult` envelope (see top of this page) with:
519
+
520
+ `result` type: `IActionResult` (not part of the request/response payload).
521
+
522
+ **Example**
523
+
524
+ ```js
525
+ const { isError, message, result } = await star.games.editGame({
526
+ id: '<id>',
527
+ newDNA: { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "STARNETHolonType": "example string", "STARNETCategory": {}, "STARNETSubCategory": {}, "Dependencies": { "OAPPs": [{ "Type": { }, "HolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "STARNETHolonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "Version": "example string", "VersionSequence": 1, "Install": true, "InstallMode": { }, "InstalledFrom": "example string", "InstalledTo": "example string" }], "Runtimes": [], "Libraries": [], "Templates": [], "NFTs": [], "NFTCollections": [], "GeoNFTs": [], "GeoNFTCollections": [], "GeoHotSpots": [], "Quests": [], "Missions": [], "Chapters": [], "InventoryItems": [], "CelestialSpaces": [], "CelestialBodies": [], "Zomes": [], "Holons": [], "CelestialBodiesMetaDataDNA": [], "ZomesMetaDataDNA": [], "HolonsMetaDataDNA": [] }, "MetaData": { "<string>": {} }, "MetaHolonTagMappings": /* <>> */, "MetaTagMappings": { "<string>": "example string" }, "CreatedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "CreatedByAvatarUsername": "example string", "CreatedOn": "2026-01-01T00:00:00Z", "SourcePath": "example string", "PublishedPath": "example string", "PublishedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PublishedByAvatarUsername": "example string", "PublishedOn": "2026-01-01T00:00:00Z", "LaunchTarget": "example string", "ModifiedByAvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ModifiedByAvatarUsername": "example string", "ModifiedOn": "2026-01-01T00:00:00Z", "PublishedOnSTARNET": true, "PublishedToCloud": true, "PublishedToPinata": true, "PinataIPFSHash": "example string", "PublishedProviderType": "example string", "FileSize": 1, "Version": "example string", "OASISRuntimeVersion": "example string", "OASISAPIVersion": "example string", "COSMICVersion": "example string", "STARRuntimeVersion": "example string", "STARODKVersion": "example string", "STARAPIVersion": "example string", "STARNETVersion": "example string", "DotNetVersion": "example string", "VersionSequence": 1, "Downloads": 1, "Installs": 1, "TotalDownloads": 1, "TotalInstalls": 1, "NumberOfVersions": 1 }
528
+ });
529
+ if (isError) throw new Error(message);
530
+ console.log(result);
531
+ ```
532
+
533
+ Example response:
534
+
535
+ ```json
536
+ {
537
+ "isError": false,
538
+ "message": "",
539
+ "result": null
540
+ }
541
+ ```
542
+
543
+ ---
544
+
545
+ ### `endGame`
546
+
547
+ Ends a game session
548
+
549
+ **POST** `api/games/{gameId}/end`
550
+
551
+ Route parameters:
552
+
553
+ | Field | Type |
554
+ | --- | --- |
555
+ | `gameId` | `Guid` |
556
+
557
+ **Request**
558
+
559
+ No request body.
560
+
561
+ **Response**
562
+
563
+ Standard `OASISResult` envelope (see top of this page) with:
564
+
565
+ `result` type: `IActionResult` (not part of the request/response payload).
566
+
567
+ **Example**
568
+
569
+ ```js
570
+ const { isError, message, result } = await star.games.endGame({
571
+ gameId: '<gameId>'
572
+ });
573
+ if (isError) throw new Error(message);
574
+ console.log(result);
575
+ ```
576
+
577
+ Example response:
578
+
579
+ ```json
580
+ {
581
+ "isError": false,
582
+ "message": "",
583
+ "result": null
584
+ }
585
+ ```
586
+
587
+ ---
588
+
589
+ ### `getAllGames`
590
+
591
+ Retrieves all games in the system.
592
+
593
+ **GET** `api/games`
594
+
595
+ **Request**
596
+
597
+ No request body.
598
+
599
+ **Response**
600
+
601
+ Standard `OASISResult` envelope (see top of this page) with:
602
+
603
+ `result` type: `IActionResult` (not part of the request/response payload).
604
+
605
+ **Example**
606
+
607
+ ```js
608
+ const { isError, message, result } = await star.games.getAllGames({});
609
+ if (isError) throw new Error(message);
610
+ console.log(result);
611
+ ```
612
+
613
+ Example response:
614
+
615
+ ```json
616
+ {
617
+ "isError": false,
618
+ "message": "",
619
+ "result": null
620
+ }
621
+ ```
622
+
623
+ ---
624
+
625
+ ### `getAvatarKarma`
626
+
627
+ Gets avatar's karma score (shared across all games)
628
+
629
+ **GET** `api/games/karma`
630
+
631
+ **Request**
632
+
633
+ No request body.
634
+
635
+ **Response**
636
+
637
+ Standard `OASISResult` envelope (see top of this page) with:
638
+
639
+ `result` type: `IActionResult` (not part of the request/response payload).
640
+
641
+ **Example**
642
+
643
+ ```js
644
+ const { isError, message, result } = await star.games.getAvatarKarma({});
645
+ if (isError) throw new Error(message);
646
+ console.log(result);
647
+ ```
648
+
649
+ Example response:
650
+
651
+ ```json
652
+ {
653
+ "isError": false,
654
+ "message": "",
655
+ "result": null
656
+ }
657
+ ```
658
+
659
+ ---
660
+
661
+ ### `getCrossGameQuests`
662
+
663
+ Gets active quests that span multiple games
664
+
665
+ **GET** `api/games/cross-game-quests`
666
+
667
+ **Request**
668
+
669
+ No request body.
670
+
671
+ **Response**
672
+
673
+ Standard `OASISResult` envelope (see top of this page) with:
674
+
675
+ `result` type: `IActionResult` (not part of the request/response payload).
676
+
677
+ **Example**
678
+
679
+ ```js
680
+ const { isError, message, result } = await star.games.getCrossGameQuests({});
681
+ if (isError) throw new Error(message);
682
+ console.log(result);
683
+ ```
684
+
685
+ Example response:
686
+
687
+ ```json
688
+ {
689
+ "isError": false,
690
+ "message": "",
691
+ "result": null
692
+ }
693
+ ```
694
+
695
+ ---
696
+
697
+ ### `getGame`
698
+
699
+ Retrieves a specific game by its unique identifier.
700
+
701
+ **GET** `api/games/{id}`
702
+
703
+ Route parameters:
704
+
705
+ | Field | Type |
706
+ | --- | --- |
707
+ | `id` | `Guid` |
708
+
709
+ **Request**
710
+
711
+ No request body.
712
+
713
+ **Response**
714
+
715
+ Standard `OASISResult` envelope (see top of this page) with:
716
+
717
+ `result` type: `IActionResult` (not part of the request/response payload).
718
+
719
+ **Example**
720
+
721
+ ```js
722
+ const { isError, message, result } = await star.games.getGame({
723
+ id: '<id>'
724
+ });
725
+ if (isError) throw new Error(message);
726
+ console.log(result);
727
+ ```
728
+
729
+ Example response:
730
+
731
+ ```json
732
+ {
733
+ "isError": false,
734
+ "message": "",
735
+ "result": null
736
+ }
737
+ ```
738
+
739
+ ---
740
+
741
+ ### `getGameVersions`
742
+
743
+ Gets all versions of a specific game.
744
+
745
+ **GET** `api/games/{id}/versions`
746
+
747
+ Route parameters:
748
+
749
+ | Field | Type |
750
+ | --- | --- |
751
+ | `id` | `Guid` |
752
+
753
+ **Request**
754
+
755
+ No request body.
756
+
757
+ **Response**
758
+
759
+ Standard `OASISResult` envelope (see top of this page) with:
760
+
761
+ `result` type: `IActionResult` (not part of the request/response payload).
762
+
763
+ **Example**
764
+
765
+ ```js
766
+ const { isError, message, result } = await star.games.getGameVersions({
767
+ id: '<id>'
768
+ });
769
+ if (isError) throw new Error(message);
770
+ console.log(result);
771
+ ```
772
+
773
+ Example response:
774
+
775
+ ```json
776
+ {
777
+ "isError": false,
778
+ "message": "",
779
+ "result": null
780
+ }
781
+ ```
782
+
783
+ ---
784
+
785
+ ### `getGamesByType`
786
+
787
+ Gets games by type.
788
+
789
+ **GET** `api/games/by-type/{type}`
790
+
791
+ Route parameters:
792
+
793
+ | Field | Type |
794
+ | --- | --- |
795
+ | `type` | `string` |
796
+
797
+ **Request**
798
+
799
+ No request body.
800
+
801
+ **Response**
802
+
803
+ Standard `OASISResult` envelope (see top of this page) with:
804
+
805
+ `result` type: `IActionResult` (not part of the request/response payload).
806
+
807
+ **Example**
808
+
809
+ ```js
810
+ const { isError, message, result } = await star.games.getGamesByType({
811
+ type: '<type>'
812
+ });
813
+ if (isError) throw new Error(message);
814
+ console.log(result);
815
+ ```
816
+
817
+ Example response:
818
+
819
+ ```json
820
+ {
821
+ "isError": false,
822
+ "message": "",
823
+ "result": null
824
+ }
825
+ ```
826
+
827
+ ---
828
+
829
+ ### `getKeyBindings`
830
+
831
+ Gets current key bindings
832
+
833
+ **GET** `api/games/{gameId}/input/bind-keys`
834
+
835
+ Route parameters:
836
+
837
+ | Field | Type |
838
+ | --- | --- |
839
+ | `gameId` | `Guid` |
840
+
841
+ **Request**
842
+
843
+ No request body.
844
+
845
+ **Response**
846
+
847
+ Standard `OASISResult` envelope (see top of this page) with:
848
+
849
+ `result` type: `IActionResult` (not part of the request/response payload).
850
+
851
+ **Example**
852
+
853
+ ```js
854
+ const { isError, message, result } = await star.games.getKeyBindings({
855
+ gameId: '<gameId>'
856
+ });
857
+ if (isError) throw new Error(message);
858
+ console.log(result);
859
+ ```
860
+
861
+ Example response:
862
+
863
+ ```json
864
+ {
865
+ "isError": false,
866
+ "message": "",
867
+ "result": null
868
+ }
869
+ ```
870
+
871
+ ---
872
+
873
+ ### `getMasterVolume`
874
+
875
+ Gets the master volume
876
+
877
+ **GET** `api/games/{gameId}/audio/master-volume`
878
+
879
+ Route parameters:
880
+
881
+ | Field | Type |
882
+ | --- | --- |
883
+ | `gameId` | `Guid` |
884
+
885
+ **Request**
886
+
887
+ No request body.
888
+
889
+ **Response**
890
+
891
+ Standard `OASISResult` envelope (see top of this page) with:
892
+
893
+ `result` type: `IActionResult` (not part of the request/response payload).
894
+
895
+ **Example**
896
+
897
+ ```js
898
+ const { isError, message, result } = await star.games.getMasterVolume({
899
+ gameId: '<gameId>'
900
+ });
901
+ if (isError) throw new Error(message);
902
+ console.log(result);
903
+ ```
904
+
905
+ Example response:
906
+
907
+ ```json
908
+ {
909
+ "isError": false,
910
+ "message": "",
911
+ "result": null
912
+ }
913
+ ```
914
+
915
+ ---
916
+
917
+ ### `getSharedInventory`
918
+
919
+ Gets shared inventory items (keycards, items, etc.) that can be used across games, apps, websites, services This uses the AvatarDetail.Inventory property - the avatar's actual owned inventory
920
+
921
+ **GET** `api/games/shared-inventory`
922
+
923
+ **Request**
924
+
925
+ No request body.
926
+
927
+ **Response**
928
+
929
+ Standard `OASISResult` envelope (see top of this page) with:
930
+
931
+ `result` type: `IActionResult` (not part of the request/response payload).
932
+
933
+ **Example**
934
+
935
+ ```js
936
+ const { isError, message, result } = await star.games.getSharedInventory({});
937
+ if (isError) throw new Error(message);
938
+ console.log(result);
939
+ ```
940
+
941
+ Example response:
942
+
943
+ ```json
944
+ {
945
+ "isError": false,
946
+ "message": "",
947
+ "result": null
948
+ }
949
+ ```
950
+
951
+ ---
952
+
953
+ ### `getSoundVolume`
954
+
955
+ Gets the sound volume
956
+
957
+ **GET** `api/games/{gameId}/audio/sound-volume`
958
+
959
+ Route parameters:
960
+
961
+ | Field | Type |
962
+ | --- | --- |
963
+ | `gameId` | `Guid` |
964
+
965
+ **Request**
966
+
967
+ No request body.
968
+
969
+ **Response**
970
+
971
+ Standard `OASISResult` envelope (see top of this page) with:
972
+
973
+ `result` type: `IActionResult` (not part of the request/response payload).
974
+
975
+ **Example**
976
+
977
+ ```js
978
+ const { isError, message, result } = await star.games.getSoundVolume({
979
+ gameId: '<gameId>'
980
+ });
981
+ if (isError) throw new Error(message);
982
+ console.log(result);
983
+ ```
984
+
985
+ Example response:
986
+
987
+ ```json
988
+ {
989
+ "isError": false,
990
+ "message": "",
991
+ "result": null
992
+ }
993
+ ```
994
+
995
+ ---
996
+
997
+ ### `getVideoSetting`
998
+
999
+ Gets the video quality setting
1000
+
1001
+ **GET** `api/games/{gameId}/video/setting`
1002
+
1003
+ Route parameters:
1004
+
1005
+ | Field | Type |
1006
+ | --- | --- |
1007
+ | `gameId` | `Guid` |
1008
+
1009
+ **Request**
1010
+
1011
+ No request body.
1012
+
1013
+ **Response**
1014
+
1015
+ Standard `OASISResult` envelope (see top of this page) with:
1016
+
1017
+ `result` type: `IActionResult` (not part of the request/response payload).
1018
+
1019
+ **Example**
1020
+
1021
+ ```js
1022
+ const { isError, message, result } = await star.games.getVideoSetting({
1023
+ gameId: '<gameId>'
1024
+ });
1025
+ if (isError) throw new Error(message);
1026
+ console.log(result);
1027
+ ```
1028
+
1029
+ Example response:
1030
+
1031
+ ```json
1032
+ {
1033
+ "isError": false,
1034
+ "message": "",
1035
+ "result": null
1036
+ }
1037
+ ```
1038
+
1039
+ ---
1040
+
1041
+ ### `getVoiceVolume`
1042
+
1043
+ Gets the voice volume
1044
+
1045
+ **GET** `api/games/{gameId}/audio/voice-volume`
1046
+
1047
+ Route parameters:
1048
+
1049
+ | Field | Type |
1050
+ | --- | --- |
1051
+ | `gameId` | `Guid` |
1052
+
1053
+ **Request**
1054
+
1055
+ No request body.
1056
+
1057
+ **Response**
1058
+
1059
+ Standard `OASISResult` envelope (see top of this page) with:
1060
+
1061
+ `result` type: `IActionResult` (not part of the request/response payload).
1062
+
1063
+ **Example**
1064
+
1065
+ ```js
1066
+ const { isError, message, result } = await star.games.getVoiceVolume({
1067
+ gameId: '<gameId>'
1068
+ });
1069
+ if (isError) throw new Error(message);
1070
+ console.log(result);
1071
+ ```
1072
+
1073
+ Example response:
1074
+
1075
+ ```json
1076
+ {
1077
+ "isError": false,
1078
+ "message": "",
1079
+ "result": null
1080
+ }
1081
+ ```
1082
+
1083
+ ---
1084
+
1085
+ ### `hasItem`
1086
+
1087
+ Checks if the avatar has a specific item in their shared inventory
1088
+
1089
+ **GET** `api/games/shared-inventory/{itemId}/has`
1090
+
1091
+ Route parameters:
1092
+
1093
+ | Field | Type |
1094
+ | --- | --- |
1095
+ | `itemId` | `Guid` |
1096
+
1097
+ **Request**
1098
+
1099
+ No request body.
1100
+
1101
+ **Response**
1102
+
1103
+ Standard `OASISResult` envelope (see top of this page) with:
1104
+
1105
+ `result` type: `IActionResult` (not part of the request/response payload).
1106
+
1107
+ **Example**
1108
+
1109
+ ```js
1110
+ const { isError, message, result } = await star.games.hasItem({
1111
+ itemId: '<itemId>'
1112
+ });
1113
+ if (isError) throw new Error(message);
1114
+ console.log(result);
1115
+ ```
1116
+
1117
+ Example response:
1118
+
1119
+ ```json
1120
+ {
1121
+ "isError": false,
1122
+ "message": "",
1123
+ "result": null
1124
+ }
1125
+ ```
1126
+
1127
+ ---
1128
+
1129
+ ### `hasItemByName`
1130
+
1131
+ Checks if the avatar has a specific item by name in their shared inventory
1132
+
1133
+ **GET** `api/games/shared-inventory/has-by-name`
1134
+
1135
+ **Request**
1136
+
1137
+ Query parameters:
1138
+
1139
+ | Field | Type |
1140
+ | --- | --- |
1141
+ | `itemName` | `string` |
1142
+
1143
+ **Response**
1144
+
1145
+ Standard `OASISResult` envelope (see top of this page) with:
1146
+
1147
+ `result` type: `IActionResult` (not part of the request/response payload).
1148
+
1149
+ **Example**
1150
+
1151
+ ```js
1152
+ const { isError, message, result } = await star.games.hasItemByName({
1153
+ itemName: 'example string'
1154
+ });
1155
+ if (isError) throw new Error(message);
1156
+ console.log(result);
1157
+ ```
1158
+
1159
+ Example response:
1160
+
1161
+ ```json
1162
+ {
1163
+ "isError": false,
1164
+ "message": "",
1165
+ "result": null
1166
+ }
1167
+ ```
1168
+
1169
+ ---
1170
+
1171
+ ### `installGame`
1172
+
1173
+ Installs a downloaded game.
1174
+
1175
+ **POST** `api/games/{id}/install`
1176
+
1177
+ Route parameters:
1178
+
1179
+ | Field | Type |
1180
+ | --- | --- |
1181
+ | `id` | `Guid` |
1182
+
1183
+ **Request**
1184
+
1185
+ Body fields:
1186
+
1187
+ | Field | Type |
1188
+ | --- | --- |
1189
+ | `version` | `int (optional)` |
1190
+ | `installPath` | `string (optional)` |
1191
+
1192
+ **Response**
1193
+
1194
+ Standard `OASISResult` envelope (see top of this page) with:
1195
+
1196
+ `result` type: `IActionResult` (not part of the request/response payload).
1197
+
1198
+ **Example**
1199
+
1200
+ ```js
1201
+ const { isError, message, result } = await star.games.installGame({
1202
+ id: '<id>',
1203
+ version: 1,
1204
+ installPath: 'example string'
1205
+ });
1206
+ if (isError) throw new Error(message);
1207
+ console.log(result);
1208
+ ```
1209
+
1210
+ Example response:
1211
+
1212
+ ```json
1213
+ {
1214
+ "isError": false,
1215
+ "message": "",
1216
+ "result": null
1217
+ }
1218
+ ```
1219
+
1220
+ ---
1221
+
1222
+ ### `jumpToArea`
1223
+
1224
+ Jumps to a specific area
1225
+
1226
+ **POST** `api/games/{gameId}/areas/jump`
1227
+
1228
+ Route parameters:
1229
+
1230
+ | Field | Type |
1231
+ | --- | --- |
1232
+ | `gameId` | `Guid` |
1233
+
1234
+ **Request**
1235
+
1236
+ Body type: `JumpToAreaRequest`
1237
+
1238
+ | Field | Type |
1239
+ | --- | --- |
1240
+ | `X` | `double` |
1241
+ | `Y` | `double` |
1242
+ | `Z` | `double` |
1243
+ | `Radius` | `double` |
1244
+
1245
+ **Response**
1246
+
1247
+ Standard `OASISResult` envelope (see top of this page) with:
1248
+
1249
+ `result` type: `IActionResult` (not part of the request/response payload).
1250
+
1251
+ **Example**
1252
+
1253
+ ```js
1254
+ const { isError, message, result } = await star.games.jumpToArea({
1255
+ gameId: '<gameId>',
1256
+ x: 1.0,
1257
+ y: 1.0,
1258
+ z: 1.0,
1259
+ radius: 1.0
1260
+ });
1261
+ if (isError) throw new Error(message);
1262
+ console.log(result);
1263
+ ```
1264
+
1265
+ Example response:
1266
+
1267
+ ```json
1268
+ {
1269
+ "isError": false,
1270
+ "message": "",
1271
+ "result": null
1272
+ }
1273
+ ```
1274
+
1275
+ ---
1276
+
1277
+ ### `jumpToLevel`
1278
+
1279
+ Jumps to a specific level
1280
+
1281
+ **POST** `api/games/{gameId}/levels/{level}/jump`
1282
+
1283
+ Route parameters:
1284
+
1285
+ | Field | Type |
1286
+ | --- | --- |
1287
+ | `gameId` | `Guid` |
1288
+ | `level` | `string` |
1289
+
1290
+ **Request**
1291
+
1292
+ No request body.
1293
+
1294
+ **Response**
1295
+
1296
+ Standard `OASISResult` envelope (see top of this page) with:
1297
+
1298
+ `result` type: `IActionResult` (not part of the request/response payload).
1299
+
1300
+ **Example**
1301
+
1302
+ ```js
1303
+ const { isError, message, result } = await star.games.jumpToLevel({
1304
+ gameId: '<gameId>',
1305
+ level: '<level>'
1306
+ });
1307
+ if (isError) throw new Error(message);
1308
+ console.log(result);
1309
+ ```
1310
+
1311
+ Example response:
1312
+
1313
+ ```json
1314
+ {
1315
+ "isError": false,
1316
+ "message": "",
1317
+ "result": null
1318
+ }
1319
+ ```
1320
+
1321
+ ---
1322
+
1323
+ ### `jumpToPointInLevel`
1324
+
1325
+ Jumps to a specific point in a level
1326
+
1327
+ **POST** `api/games/{gameId}/levels/{level}/jump-to-point`
1328
+
1329
+ Route parameters:
1330
+
1331
+ | Field | Type |
1332
+ | --- | --- |
1333
+ | `gameId` | `Guid` |
1334
+ | `level` | `string` |
1335
+
1336
+ **Request**
1337
+
1338
+ Body type: `Point3D`
1339
+
1340
+ | Field | Type |
1341
+ | --- | --- |
1342
+ | `X` | `double` |
1343
+ | `Y` | `double` |
1344
+ | `Z` | `double` |
1345
+
1346
+ **Response**
1347
+
1348
+ Standard `OASISResult` envelope (see top of this page) with:
1349
+
1350
+ `result` type: `IActionResult` (not part of the request/response payload).
1351
+
1352
+ **Example**
1353
+
1354
+ ```js
1355
+ const { isError, message, result } = await star.games.jumpToPointInLevel({
1356
+ gameId: '<gameId>',
1357
+ level: '<level>',
1358
+ x: 1.0,
1359
+ y: 1.0,
1360
+ z: 1.0
1361
+ });
1362
+ if (isError) throw new Error(message);
1363
+ console.log(result);
1364
+ ```
1365
+
1366
+ Example response:
1367
+
1368
+ ```json
1369
+ {
1370
+ "isError": false,
1371
+ "message": "",
1372
+ "result": null
1373
+ }
1374
+ ```
1375
+
1376
+ ---
1377
+
1378
+ ### `loadAllGamesForAvatar`
1379
+
1380
+ Loads all games for the authenticated avatar.
1381
+
1382
+ **GET** `api/games/load-all-for-avatar`
1383
+
1384
+ **Request**
1385
+
1386
+ Query parameters:
1387
+
1388
+ | Field | Type |
1389
+ | --- | --- |
1390
+ | `showAllVersions` | `bool (optional)` |
1391
+ | `version` | `int (optional)` |
1392
+
1393
+ **Response**
1394
+
1395
+ Standard `OASISResult` envelope (see top of this page) with:
1396
+
1397
+ `result` type: `IActionResult` (not part of the request/response payload).
1398
+
1399
+ **Example**
1400
+
1401
+ ```js
1402
+ const { isError, message, result } = await star.games.loadAllGamesForAvatar({
1403
+ showAllVersions: true,
1404
+ version: 1
1405
+ });
1406
+ if (isError) throw new Error(message);
1407
+ console.log(result);
1408
+ ```
1409
+
1410
+ Example response:
1411
+
1412
+ ```json
1413
+ {
1414
+ "isError": false,
1415
+ "message": "",
1416
+ "result": null
1417
+ }
1418
+ ```
1419
+
1420
+ ---
1421
+
1422
+ ### `loadArea`
1423
+
1424
+ Loads an area around a specific point
1425
+
1426
+ **POST** `api/games/{gameId}/areas/load`
1427
+
1428
+ Route parameters:
1429
+
1430
+ | Field | Type |
1431
+ | --- | --- |
1432
+ | `gameId` | `Guid` |
1433
+
1434
+ **Request**
1435
+
1436
+ Body type: `LoadAreaRequest`
1437
+
1438
+ | Field | Type |
1439
+ | --- | --- |
1440
+ | `X` | `double` |
1441
+ | `Y` | `double` |
1442
+ | `Z` | `double` |
1443
+ | `Radius` | `double` |
1444
+
1445
+ **Response**
1446
+
1447
+ Standard `OASISResult` envelope (see top of this page) with:
1448
+
1449
+ `result` type: `IActionResult` (not part of the request/response payload).
1450
+
1451
+ **Example**
1452
+
1453
+ ```js
1454
+ const { isError, message, result } = await star.games.loadArea({
1455
+ gameId: '<gameId>',
1456
+ x: 1.0,
1457
+ y: 1.0,
1458
+ z: 1.0,
1459
+ radius: 1.0
1460
+ });
1461
+ if (isError) throw new Error(message);
1462
+ console.log(result);
1463
+ ```
1464
+
1465
+ Example response:
1466
+
1467
+ ```json
1468
+ {
1469
+ "isError": false,
1470
+ "message": "",
1471
+ "result": null
1472
+ }
1473
+ ```
1474
+
1475
+ ---
1476
+
1477
+ ### `loadGame`
1478
+
1479
+ Loads a game into memory
1480
+
1481
+ **POST** `api/games/{gameId}/load`
1482
+
1483
+ Route parameters:
1484
+
1485
+ | Field | Type |
1486
+ | --- | --- |
1487
+ | `gameId` | `Guid` |
1488
+
1489
+ **Request**
1490
+
1491
+ No request body.
1492
+
1493
+ **Response**
1494
+
1495
+ Standard `OASISResult` envelope (see top of this page) with:
1496
+
1497
+ `result` type: `IActionResult` (not part of the request/response payload).
1498
+
1499
+ **Example**
1500
+
1501
+ ```js
1502
+ const { isError, message, result } = await star.games.loadGame({
1503
+ gameId: '<gameId>'
1504
+ });
1505
+ if (isError) throw new Error(message);
1506
+ console.log(result);
1507
+ ```
1508
+
1509
+ Example response:
1510
+
1511
+ ```json
1512
+ {
1513
+ "isError": false,
1514
+ "message": "",
1515
+ "result": null
1516
+ }
1517
+ ```
1518
+
1519
+ ---
1520
+
1521
+ ### `loadGameById`
1522
+
1523
+ Loads a game by ID with optional version and holon type.
1524
+
1525
+ **GET** `api/games/{id}/load`
1526
+
1527
+ Route parameters:
1528
+
1529
+ | Field | Type |
1530
+ | --- | --- |
1531
+ | `id` | `Guid` |
1532
+
1533
+ **Request**
1534
+
1535
+ Query parameters:
1536
+
1537
+ | Field | Type |
1538
+ | --- | --- |
1539
+ | `version` | `int (optional)` |
1540
+ | `holonType` | `string (optional)` |
1541
+
1542
+ **Response**
1543
+
1544
+ Standard `OASISResult` envelope (see top of this page) with:
1545
+
1546
+ `result` type: `IActionResult` (not part of the request/response payload).
1547
+
1548
+ **Example**
1549
+
1550
+ ```js
1551
+ const { isError, message, result } = await star.games.loadGameById({
1552
+ id: '<id>',
1553
+ version: 1,
1554
+ holonType: 'example string'
1555
+ });
1556
+ if (isError) throw new Error(message);
1557
+ console.log(result);
1558
+ ```
1559
+
1560
+ Example response:
1561
+
1562
+ ```json
1563
+ {
1564
+ "isError": false,
1565
+ "message": "",
1566
+ "result": null
1567
+ }
1568
+ ```
1569
+
1570
+ ---
1571
+
1572
+ ### `loadGameFromPath`
1573
+
1574
+ Loads a game from source or installed folder path.
1575
+
1576
+ **GET** `api/games/load-from-path`
1577
+
1578
+ **Request**
1579
+
1580
+ Query parameters:
1581
+
1582
+ | Field | Type |
1583
+ | --- | --- |
1584
+ | `path` | `string` |
1585
+ | `holonType` | `string (optional)` |
1586
+
1587
+ **Response**
1588
+
1589
+ Standard `OASISResult` envelope (see top of this page) with:
1590
+
1591
+ `result` type: `IActionResult` (not part of the request/response payload).
1592
+
1593
+ **Example**
1594
+
1595
+ ```js
1596
+ const { isError, message, result } = await star.games.loadGameFromPath({
1597
+ path: 'example string',
1598
+ holonType: 'example string'
1599
+ });
1600
+ if (isError) throw new Error(message);
1601
+ console.log(result);
1602
+ ```
1603
+
1604
+ Example response:
1605
+
1606
+ ```json
1607
+ {
1608
+ "isError": false,
1609
+ "message": "",
1610
+ "result": null
1611
+ }
1612
+ ```
1613
+
1614
+ ---
1615
+
1616
+ ### `loadGameFromPublished`
1617
+
1618
+ Loads a game from a published file.
1619
+
1620
+ **GET** `api/games/load-from-published`
1621
+
1622
+ **Request**
1623
+
1624
+ Query parameters:
1625
+
1626
+ | Field | Type |
1627
+ | --- | --- |
1628
+ | `publishedFilePath` | `string` |
1629
+
1630
+ **Response**
1631
+
1632
+ Standard `OASISResult` envelope (see top of this page) with:
1633
+
1634
+ `result` type: `IActionResult` (not part of the request/response payload).
1635
+
1636
+ **Example**
1637
+
1638
+ ```js
1639
+ const { isError, message, result } = await star.games.loadGameFromPublished({
1640
+ publishedFilePath: 'example string'
1641
+ });
1642
+ if (isError) throw new Error(message);
1643
+ console.log(result);
1644
+ ```
1645
+
1646
+ Example response:
1647
+
1648
+ ```json
1649
+ {
1650
+ "isError": false,
1651
+ "message": "",
1652
+ "result": null
1653
+ }
1654
+ ```
1655
+
1656
+ ---
1657
+
1658
+ ### `loadGameVersion`
1659
+
1660
+ Loads a specific version of a game.
1661
+
1662
+ **GET** `api/games/{id}/version/{version}`
1663
+
1664
+ Route parameters:
1665
+
1666
+ | Field | Type |
1667
+ | --- | --- |
1668
+ | `id` | `Guid` |
1669
+ | `version` | `string` |
1670
+
1671
+ **Request**
1672
+
1673
+ No request body.
1674
+
1675
+ **Response**
1676
+
1677
+ Standard `OASISResult` envelope (see top of this page) with:
1678
+
1679
+ `result` type: `IActionResult` (not part of the request/response payload).
1680
+
1681
+ **Example**
1682
+
1683
+ ```js
1684
+ const { isError, message, result } = await star.games.loadGameVersion({
1685
+ id: '<id>',
1686
+ version: '<version>'
1687
+ });
1688
+ if (isError) throw new Error(message);
1689
+ console.log(result);
1690
+ ```
1691
+
1692
+ Example response:
1693
+
1694
+ ```json
1695
+ {
1696
+ "isError": false,
1697
+ "message": "",
1698
+ "result": null
1699
+ }
1700
+ ```
1701
+
1702
+ ---
1703
+
1704
+ ### `loadLevel`
1705
+
1706
+ Loads a specific level in a game
1707
+
1708
+ **POST** `api/games/{gameId}/levels/{level}/load`
1709
+
1710
+ Route parameters:
1711
+
1712
+ | Field | Type |
1713
+ | --- | --- |
1714
+ | `gameId` | `Guid` |
1715
+ | `level` | `string` |
1716
+
1717
+ **Request**
1718
+
1719
+ No request body.
1720
+
1721
+ **Response**
1722
+
1723
+ Standard `OASISResult` envelope (see top of this page) with:
1724
+
1725
+ `result` type: `IActionResult` (not part of the request/response payload).
1726
+
1727
+ **Example**
1728
+
1729
+ ```js
1730
+ const { isError, message, result } = await star.games.loadLevel({
1731
+ gameId: '<gameId>',
1732
+ level: '<level>'
1733
+ });
1734
+ if (isError) throw new Error(message);
1735
+ console.log(result);
1736
+ ```
1737
+
1738
+ Example response:
1739
+
1740
+ ```json
1741
+ {
1742
+ "isError": false,
1743
+ "message": "",
1744
+ "result": null
1745
+ }
1746
+ ```
1747
+
1748
+ ---
1749
+
1750
+ ### `publishGame`
1751
+
1752
+ Publishes a game to the STARNET system.
1753
+
1754
+ **POST** `api/games/{id}/publish`
1755
+
1756
+ Route parameters:
1757
+
1758
+ | Field | Type |
1759
+ | --- | --- |
1760
+ | `id` | `Guid` |
1761
+
1762
+ **Request**
1763
+
1764
+ Body type: `PublishRequest`
1765
+
1766
+ | Field | Type |
1767
+ | --- | --- |
1768
+ | `SourcePath` | `string` |
1769
+ | `LaunchTarget` | `string` |
1770
+ | `PublishPath` | `string` |
1771
+ | `Edit` | `bool` |
1772
+ | `RegisterOnSTARNET` | `bool` |
1773
+ | `GenerateBinary` | `bool` |
1774
+ | `UploadToCloud` | `bool` |
1775
+
1776
+ **Response**
1777
+
1778
+ Standard `OASISResult` envelope (see top of this page) with:
1779
+
1780
+ `result` type: `IActionResult` (not part of the request/response payload).
1781
+
1782
+ **Example**
1783
+
1784
+ ```js
1785
+ const { isError, message, result } = await star.games.publishGame({
1786
+ id: '<id>',
1787
+ sourcePath: "example string",
1788
+ launchTarget: "example string",
1789
+ publishPath: "example string",
1790
+ edit: true,
1791
+ registerOnSTARNET: true,
1792
+ generateBinary: true,
1793
+ uploadToCloud: true
1794
+ });
1795
+ if (isError) throw new Error(message);
1796
+ console.log(result);
1797
+ ```
1798
+
1799
+ Example response:
1800
+
1801
+ ```json
1802
+ {
1803
+ "isError": false,
1804
+ "message": "",
1805
+ "result": null
1806
+ }
1807
+ ```
1808
+
1809
+ ---
1810
+
1811
+ ### `removeItemFromInventory`
1812
+
1813
+ Removes an item from the avatar's shared inventory
1814
+
1815
+ **DELETE** `api/games/shared-inventory/{itemId}`
1816
+
1817
+ Route parameters:
1818
+
1819
+ | Field | Type |
1820
+ | --- | --- |
1821
+ | `itemId` | `Guid` |
1822
+
1823
+ **Request**
1824
+
1825
+ No request body.
1826
+
1827
+ **Response**
1828
+
1829
+ Standard `OASISResult` envelope (see top of this page) with:
1830
+
1831
+ `result` type: `IActionResult` (not part of the request/response payload).
1832
+
1833
+ **Example**
1834
+
1835
+ ```js
1836
+ const { isError, message, result } = await star.games.removeItemFromInventory({
1837
+ itemId: '<itemId>'
1838
+ });
1839
+ if (isError) throw new Error(message);
1840
+ console.log(result);
1841
+ ```
1842
+
1843
+ Example response:
1844
+
1845
+ ```json
1846
+ {
1847
+ "isError": false,
1848
+ "message": "",
1849
+ "result": null
1850
+ }
1851
+ ```
1852
+
1853
+ ---
1854
+
1855
+ ### `republishGame`
1856
+
1857
+ Republishes a game to the STARNET system.
1858
+
1859
+ **POST** `api/games/{id}/republish`
1860
+
1861
+ Route parameters:
1862
+
1863
+ | Field | Type |
1864
+ | --- | --- |
1865
+ | `id` | `Guid` |
1866
+
1867
+ **Request**
1868
+
1869
+ Body type: `PublishRequest`
1870
+
1871
+ | Field | Type |
1872
+ | --- | --- |
1873
+ | `SourcePath` | `string` |
1874
+ | `LaunchTarget` | `string` |
1875
+ | `PublishPath` | `string` |
1876
+ | `Edit` | `bool` |
1877
+ | `RegisterOnSTARNET` | `bool` |
1878
+ | `GenerateBinary` | `bool` |
1879
+ | `UploadToCloud` | `bool` |
1880
+
1881
+ **Response**
1882
+
1883
+ Standard `OASISResult` envelope (see top of this page) with:
1884
+
1885
+ `result` type: `IActionResult` (not part of the request/response payload).
1886
+
1887
+ **Example**
1888
+
1889
+ ```js
1890
+ const { isError, message, result } = await star.games.republishGame({
1891
+ id: '<id>',
1892
+ sourcePath: "example string",
1893
+ launchTarget: "example string",
1894
+ publishPath: "example string",
1895
+ edit: true,
1896
+ registerOnSTARNET: true,
1897
+ generateBinary: true,
1898
+ uploadToCloud: true
1899
+ });
1900
+ if (isError) throw new Error(message);
1901
+ console.log(result);
1902
+ ```
1903
+
1904
+ Example response:
1905
+
1906
+ ```json
1907
+ {
1908
+ "isError": false,
1909
+ "message": "",
1910
+ "result": null
1911
+ }
1912
+ ```
1913
+
1914
+ ---
1915
+
1916
+ ### `searchGames`
1917
+
1918
+ Searches games by name or description.
1919
+
1920
+ **GET** `api/games/search`
1921
+
1922
+ **Request**
1923
+
1924
+ Query parameters:
1925
+
1926
+ | Field | Type |
1927
+ | --- | --- |
1928
+ | `query` | `string` |
1929
+
1930
+ **Response**
1931
+
1932
+ Standard `OASISResult` envelope (see top of this page) with:
1933
+
1934
+ `result` type: `IActionResult` (not part of the request/response payload).
1935
+
1936
+ **Example**
1937
+
1938
+ ```js
1939
+ const { isError, message, result } = await star.games.searchGames({
1940
+ query: 'example string'
1941
+ });
1942
+ if (isError) throw new Error(message);
1943
+ console.log(result);
1944
+ ```
1945
+
1946
+ Example response:
1947
+
1948
+ ```json
1949
+ {
1950
+ "isError": false,
1951
+ "message": "",
1952
+ "result": null
1953
+ }
1954
+ ```
1955
+
1956
+ ---
1957
+
1958
+ ### `setMasterVolume`
1959
+
1960
+ Sets the master volume
1961
+
1962
+ **POST** `api/games/{gameId}/audio/master-volume`
1963
+
1964
+ Route parameters:
1965
+
1966
+ | Field | Type |
1967
+ | --- | --- |
1968
+ | `gameId` | `Guid` |
1969
+
1970
+ **Request**
1971
+
1972
+ Body type: `VolumeRequest`
1973
+
1974
+ | Field | Type |
1975
+ | --- | --- |
1976
+ | `Volume` | `double` |
1977
+
1978
+ **Response**
1979
+
1980
+ Standard `OASISResult` envelope (see top of this page) with:
1981
+
1982
+ `result` type: `IActionResult` (not part of the request/response payload).
1983
+
1984
+ **Example**
1985
+
1986
+ ```js
1987
+ const { isError, message, result } = await star.games.setMasterVolume({
1988
+ gameId: '<gameId>',
1989
+ volume: 1.0
1990
+ });
1991
+ if (isError) throw new Error(message);
1992
+ console.log(result);
1993
+ ```
1994
+
1995
+ Example response:
1996
+
1997
+ ```json
1998
+ {
1999
+ "isError": false,
2000
+ "message": "",
2001
+ "result": null
2002
+ }
2003
+ ```
2004
+
2005
+ ---
2006
+
2007
+ ### `setSoundVolume`
2008
+
2009
+ Sets the sound volume
2010
+
2011
+ **POST** `api/games/{gameId}/audio/sound-volume`
2012
+
2013
+ Route parameters:
2014
+
2015
+ | Field | Type |
2016
+ | --- | --- |
2017
+ | `gameId` | `Guid` |
2018
+
2019
+ **Request**
2020
+
2021
+ Body type: `VolumeRequest`
2022
+
2023
+ | Field | Type |
2024
+ | --- | --- |
2025
+ | `Volume` | `double` |
2026
+
2027
+ **Response**
2028
+
2029
+ Standard `OASISResult` envelope (see top of this page) with:
2030
+
2031
+ `result` type: `IActionResult` (not part of the request/response payload).
2032
+
2033
+ **Example**
2034
+
2035
+ ```js
2036
+ const { isError, message, result } = await star.games.setSoundVolume({
2037
+ gameId: '<gameId>',
2038
+ volume: 1.0
2039
+ });
2040
+ if (isError) throw new Error(message);
2041
+ console.log(result);
2042
+ ```
2043
+
2044
+ Example response:
2045
+
2046
+ ```json
2047
+ {
2048
+ "isError": false,
2049
+ "message": "",
2050
+ "result": null
2051
+ }
2052
+ ```
2053
+
2054
+ ---
2055
+
2056
+ ### `setVideoSetting`
2057
+
2058
+ Sets the video quality setting
2059
+
2060
+ **POST** `api/games/{gameId}/video/setting`
2061
+
2062
+ Route parameters:
2063
+
2064
+ | Field | Type |
2065
+ | --- | --- |
2066
+ | `gameId` | `Guid` |
2067
+
2068
+ **Request**
2069
+
2070
+ Body type: `VideoSettingRequest`
2071
+
2072
+ | Field | Type |
2073
+ | --- | --- |
2074
+ | `Setting` | `VideoSetting` |
2075
+
2076
+ **Response**
2077
+
2078
+ Standard `OASISResult` envelope (see top of this page) with:
2079
+
2080
+ `result` type: `IActionResult` (not part of the request/response payload).
2081
+
2082
+ **Example**
2083
+
2084
+ ```js
2085
+ const { isError, message, result } = await star.games.setVideoSetting({
2086
+ gameId: '<gameId>',
2087
+ setting: { }
2088
+ });
2089
+ if (isError) throw new Error(message);
2090
+ console.log(result);
2091
+ ```
2092
+
2093
+ Example response:
2094
+
2095
+ ```json
2096
+ {
2097
+ "isError": false,
2098
+ "message": "",
2099
+ "result": null
2100
+ }
2101
+ ```
2102
+
2103
+ ---
2104
+
2105
+ ### `setVoiceVolume`
2106
+
2107
+ Sets the voice volume
2108
+
2109
+ **POST** `api/games/{gameId}/audio/voice-volume`
2110
+
2111
+ Route parameters:
2112
+
2113
+ | Field | Type |
2114
+ | --- | --- |
2115
+ | `gameId` | `Guid` |
2116
+
2117
+ **Request**
2118
+
2119
+ Body type: `VolumeRequest`
2120
+
2121
+ | Field | Type |
2122
+ | --- | --- |
2123
+ | `Volume` | `double` |
2124
+
2125
+ **Response**
2126
+
2127
+ Standard `OASISResult` envelope (see top of this page) with:
2128
+
2129
+ `result` type: `IActionResult` (not part of the request/response payload).
2130
+
2131
+ **Example**
2132
+
2133
+ ```js
2134
+ const { isError, message, result } = await star.games.setVoiceVolume({
2135
+ gameId: '<gameId>',
2136
+ volume: 1.0
2137
+ });
2138
+ if (isError) throw new Error(message);
2139
+ console.log(result);
2140
+ ```
2141
+
2142
+ Example response:
2143
+
2144
+ ```json
2145
+ {
2146
+ "isError": false,
2147
+ "message": "",
2148
+ "result": null
2149
+ }
2150
+ ```
2151
+
2152
+ ---
2153
+
2154
+ ### `showCredits`
2155
+
2156
+ Shows the credits screen
2157
+
2158
+ **POST** `api/games/{gameId}/ui/credits`
2159
+
2160
+ Route parameters:
2161
+
2162
+ | Field | Type |
2163
+ | --- | --- |
2164
+ | `gameId` | `Guid` |
2165
+
2166
+ **Request**
2167
+
2168
+ No request body.
2169
+
2170
+ **Response**
2171
+
2172
+ Standard `OASISResult` envelope (see top of this page) with:
2173
+
2174
+ `result` type: `IActionResult` (not part of the request/response payload).
2175
+
2176
+ **Example**
2177
+
2178
+ ```js
2179
+ const { isError, message, result } = await star.games.showCredits({
2180
+ gameId: '<gameId>'
2181
+ });
2182
+ if (isError) throw new Error(message);
2183
+ console.log(result);
2184
+ ```
2185
+
2186
+ Example response:
2187
+
2188
+ ```json
2189
+ {
2190
+ "isError": false,
2191
+ "message": "",
2192
+ "result": null
2193
+ }
2194
+ ```
2195
+
2196
+ ---
2197
+
2198
+ ### `showMainMenu`
2199
+
2200
+ Shows the main menu
2201
+
2202
+ **POST** `api/games/{gameId}/ui/main-menu`
2203
+
2204
+ Route parameters:
2205
+
2206
+ | Field | Type |
2207
+ | --- | --- |
2208
+ | `gameId` | `Guid` |
2209
+
2210
+ **Request**
2211
+
2212
+ No request body.
2213
+
2214
+ **Response**
2215
+
2216
+ Standard `OASISResult` envelope (see top of this page) with:
2217
+
2218
+ `result` type: `IActionResult` (not part of the request/response payload).
2219
+
2220
+ **Example**
2221
+
2222
+ ```js
2223
+ const { isError, message, result } = await star.games.showMainMenu({
2224
+ gameId: '<gameId>'
2225
+ });
2226
+ if (isError) throw new Error(message);
2227
+ console.log(result);
2228
+ ```
2229
+
2230
+ Example response:
2231
+
2232
+ ```json
2233
+ {
2234
+ "isError": false,
2235
+ "message": "",
2236
+ "result": null
2237
+ }
2238
+ ```
2239
+
2240
+ ---
2241
+
2242
+ ### `showOptions`
2243
+
2244
+ Shows the options menu
2245
+
2246
+ **POST** `api/games/{gameId}/ui/options`
2247
+
2248
+ Route parameters:
2249
+
2250
+ | Field | Type |
2251
+ | --- | --- |
2252
+ | `gameId` | `Guid` |
2253
+
2254
+ **Request**
2255
+
2256
+ No request body.
2257
+
2258
+ **Response**
2259
+
2260
+ Standard `OASISResult` envelope (see top of this page) with:
2261
+
2262
+ `result` type: `IActionResult` (not part of the request/response payload).
2263
+
2264
+ **Example**
2265
+
2266
+ ```js
2267
+ const { isError, message, result } = await star.games.showOptions({
2268
+ gameId: '<gameId>'
2269
+ });
2270
+ if (isError) throw new Error(message);
2271
+ console.log(result);
2272
+ ```
2273
+
2274
+ Example response:
2275
+
2276
+ ```json
2277
+ {
2278
+ "isError": false,
2279
+ "message": "",
2280
+ "result": null
2281
+ }
2282
+ ```
2283
+
2284
+ ---
2285
+
2286
+ ### `showTitleScreen`
2287
+
2288
+ Shows the title screen
2289
+
2290
+ **POST** `api/games/{gameId}/ui/title-screen`
2291
+
2292
+ Route parameters:
2293
+
2294
+ | Field | Type |
2295
+ | --- | --- |
2296
+ | `gameId` | `Guid` |
2297
+
2298
+ **Request**
2299
+
2300
+ No request body.
2301
+
2302
+ **Response**
2303
+
2304
+ Standard `OASISResult` envelope (see top of this page) with:
2305
+
2306
+ `result` type: `IActionResult` (not part of the request/response payload).
2307
+
2308
+ **Example**
2309
+
2310
+ ```js
2311
+ const { isError, message, result } = await star.games.showTitleScreen({
2312
+ gameId: '<gameId>'
2313
+ });
2314
+ if (isError) throw new Error(message);
2315
+ console.log(result);
2316
+ ```
2317
+
2318
+ Example response:
2319
+
2320
+ ```json
2321
+ {
2322
+ "isError": false,
2323
+ "message": "",
2324
+ "result": null
2325
+ }
2326
+ ```
2327
+
2328
+ ---
2329
+
2330
+ ### `startGame`
2331
+
2332
+ Starts a new game session
2333
+
2334
+ **POST** `api/games/{gameId}/start`
2335
+
2336
+ Route parameters:
2337
+
2338
+ | Field | Type |
2339
+ | --- | --- |
2340
+ | `gameId` | `Guid` |
2341
+
2342
+ **Request**
2343
+
2344
+ No request body.
2345
+
2346
+ **Response**
2347
+
2348
+ Standard `OASISResult` envelope (see top of this page) with:
2349
+
2350
+ `result` type: `IActionResult` (not part of the request/response payload).
2351
+
2352
+ **Example**
2353
+
2354
+ ```js
2355
+ const { isError, message, result } = await star.games.startGame({
2356
+ gameId: '<gameId>'
2357
+ });
2358
+ if (isError) throw new Error(message);
2359
+ console.log(result);
2360
+ ```
2361
+
2362
+ Example response:
2363
+
2364
+ ```json
2365
+ {
2366
+ "isError": false,
2367
+ "message": "",
2368
+ "result": null
2369
+ }
2370
+ ```
2371
+
2372
+ ---
2373
+
2374
+ ### `unloadArea`
2375
+
2376
+ Unloads an area
2377
+
2378
+ **POST** `api/games/{gameId}/areas/{areaId}/unload`
2379
+
2380
+ Route parameters:
2381
+
2382
+ | Field | Type |
2383
+ | --- | --- |
2384
+ | `gameId` | `Guid` |
2385
+ | `areaId` | `Guid` |
2386
+
2387
+ **Request**
2388
+
2389
+ No request body.
2390
+
2391
+ **Response**
2392
+
2393
+ Standard `OASISResult` envelope (see top of this page) with:
2394
+
2395
+ `result` type: `IActionResult` (not part of the request/response payload).
2396
+
2397
+ **Example**
2398
+
2399
+ ```js
2400
+ const { isError, message, result } = await star.games.unloadArea({
2401
+ gameId: '<gameId>',
2402
+ areaId: '<areaId>'
2403
+ });
2404
+ if (isError) throw new Error(message);
2405
+ console.log(result);
2406
+ ```
2407
+
2408
+ Example response:
2409
+
2410
+ ```json
2411
+ {
2412
+ "isError": false,
2413
+ "message": "",
2414
+ "result": null
2415
+ }
2416
+ ```
2417
+
2418
+ ---
2419
+
2420
+ ### `unloadGame`
2421
+
2422
+ Unloads a game from memory
2423
+
2424
+ **POST** `api/games/{gameId}/unload`
2425
+
2426
+ Route parameters:
2427
+
2428
+ | Field | Type |
2429
+ | --- | --- |
2430
+ | `gameId` | `Guid` |
2431
+
2432
+ **Request**
2433
+
2434
+ No request body.
2435
+
2436
+ **Response**
2437
+
2438
+ Standard `OASISResult` envelope (see top of this page) with:
2439
+
2440
+ `result` type: `IActionResult` (not part of the request/response payload).
2441
+
2442
+ **Example**
2443
+
2444
+ ```js
2445
+ const { isError, message, result } = await star.games.unloadGame({
2446
+ gameId: '<gameId>'
2447
+ });
2448
+ if (isError) throw new Error(message);
2449
+ console.log(result);
2450
+ ```
2451
+
2452
+ Example response:
2453
+
2454
+ ```json
2455
+ {
2456
+ "isError": false,
2457
+ "message": "",
2458
+ "result": null
2459
+ }
2460
+ ```
2461
+
2462
+ ---
2463
+
2464
+ ### `unloadLevel`
2465
+
2466
+ Unloads a specific level
2467
+
2468
+ **POST** `api/games/{gameId}/levels/{level}/unload`
2469
+
2470
+ Route parameters:
2471
+
2472
+ | Field | Type |
2473
+ | --- | --- |
2474
+ | `gameId` | `Guid` |
2475
+ | `level` | `string` |
2476
+
2477
+ **Request**
2478
+
2479
+ No request body.
2480
+
2481
+ **Response**
2482
+
2483
+ Standard `OASISResult` envelope (see top of this page) with:
2484
+
2485
+ `result` type: `IActionResult` (not part of the request/response payload).
2486
+
2487
+ **Example**
2488
+
2489
+ ```js
2490
+ const { isError, message, result } = await star.games.unloadLevel({
2491
+ gameId: '<gameId>',
2492
+ level: '<level>'
2493
+ });
2494
+ if (isError) throw new Error(message);
2495
+ console.log(result);
2496
+ ```
2497
+
2498
+ Example response:
2499
+
2500
+ ```json
2501
+ {
2502
+ "isError": false,
2503
+ "message": "",
2504
+ "result": null
2505
+ }
2506
+ ```
2507
+
2508
+ ---
2509
+
2510
+ ### `unpublishGame`
2511
+
2512
+ Unpublishes a game from the STARNET system.
2513
+
2514
+ **POST** `api/games/{id}/unpublish`
2515
+
2516
+ Route parameters:
2517
+
2518
+ | Field | Type |
2519
+ | --- | --- |
2520
+ | `id` | `Guid` |
2521
+
2522
+ **Request**
2523
+
2524
+ Body fields:
2525
+
2526
+ | Field | Type |
2527
+ | --- | --- |
2528
+ | `version` | `int (optional)` |
2529
+
2530
+ **Response**
2531
+
2532
+ Standard `OASISResult` envelope (see top of this page) with:
2533
+
2534
+ `result` type: `IActionResult` (not part of the request/response payload).
2535
+
2536
+ **Example**
2537
+
2538
+ ```js
2539
+ const { isError, message, result } = await star.games.unpublishGame({
2540
+ id: '<id>',
2541
+ version: 1
2542
+ });
2543
+ if (isError) throw new Error(message);
2544
+ console.log(result);
2545
+ ```
2546
+
2547
+ Example response:
2548
+
2549
+ ```json
2550
+ {
2551
+ "isError": false,
2552
+ "message": "",
2553
+ "result": null
2554
+ }
2555
+ ```
2556
+
2557
+ ---
2558
+
2559
+ ### `updateGame`
2560
+
2561
+ Updates an existing game.
2562
+
2563
+ **PUT** `api/games/{id}`
2564
+
2565
+ Route parameters:
2566
+
2567
+ | Field | Type |
2568
+ | --- | --- |
2569
+ | `id` | `Guid` |
2570
+
2571
+ **Request**
2572
+
2573
+ Body type: `IGame`
2574
+
2575
+ | Field | Type |
2576
+ | --- | --- |
2577
+ | `GameType` | `GameType` |
2578
+ | `Version` | `string` |
2579
+ | `Developer` | `string` |
2580
+ | `Publisher` | `string` |
2581
+ | `ReleaseDate` | `DateTime` |
2582
+ | `SupportedPlatforms` | `List<string>` |
2583
+ | `SupportsCrossGameInterop` | `bool` |
2584
+ | `GameSettings` | `Dictionary<string, object>` |
2585
+
2586
+ **Response**
2587
+
2588
+ Standard `OASISResult` envelope (see top of this page) with:
2589
+
2590
+ `result` type: `IActionResult` (not part of the request/response payload).
2591
+
2592
+ **Example**
2593
+
2594
+ ```js
2595
+ const { isError, message, result } = await star.games.updateGame({
2596
+ id: '<id>',
2597
+ gameType: { },
2598
+ version: "example string",
2599
+ developer: "example string",
2600
+ publisher: "example string",
2601
+ releaseDate: "2026-01-01T00:00:00Z",
2602
+ supportedPlatforms: ["example string"],
2603
+ supportsCrossGameInterop: true,
2604
+ gameSettings: { "<string>": {} }
2605
+ });
2606
+ if (isError) throw new Error(message);
2607
+ console.log(result);
2608
+ ```
2609
+
2610
+ Example response:
2611
+
2612
+ ```json
2613
+ {
2614
+ "isError": false,
2615
+ "message": "",
2616
+ "result": null
2617
+ }
2618
+ ```
2619
+