@indiegems/gem-web-sdk 15.3.3 → 16.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.
- package/CHANGELOG.md +20 -0
- package/dist/conformance.d.ts +7 -1
- package/dist/game.d.ts +187 -1
- package/dist/gem-web-sdk.bridge.js +2 -2
- package/dist/gem-web-sdk.conformance.js +3 -3
- package/dist/gem-web-sdk.esm.js +3 -3
- package/dist/gem-web-sdk.function.js +3 -3
- package/dist/gem-web-sdk.game.js +3 -3
- package/dist/gem-web-sdk.min.js +3 -3
- package/dist/gem-web-sdk.sdk.js +3 -3
- package/dist/gem-web-sdk.server.js +2 -2
- package/dist/index.d.ts +171 -7
- package/dist/sdk.d.ts +187 -1
- package/docs/api/api-reference-function.md +1 -1
- package/docs/api/api-reference-game.md +762 -3
- package/docs/api/api-reference-server.md +1 -1
- package/docs/api/reference.json +1203 -190
- package/docs/arcade-and-store.md +289 -0
- package/docs/arcade-economy.md +13 -9
- package/docs/changelog.md +20 -0
- package/docs/getting-started.md +1 -1
- package/docs/inventory-and-catalogs.md +8 -4
- package/docs/manifest.json +15 -10
- package/docs/player-text-fields.json +45 -4
- package/docs/server-bundles.md +2 -2
- package/package.json +1 -1
- package/schema/bridge.v1.json +735 -5
- package/schema/capabilities.public.json +28 -0
package/docs/api/reference.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schema_version": 2,
|
|
3
3
|
"source": {
|
|
4
4
|
"repo": "IndieGems/gem-web-sdk",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "16.0.0"
|
|
6
6
|
},
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -69,6 +69,14 @@
|
|
|
69
69
|
"key": "share",
|
|
70
70
|
"title": "Sharing a link to your game"
|
|
71
71
|
},
|
|
72
|
+
{
|
|
73
|
+
"key": "arcade",
|
|
74
|
+
"title": "Arcade features: app links, other games"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"key": "store",
|
|
78
|
+
"title": "The Arcade Store, for real money"
|
|
79
|
+
},
|
|
72
80
|
{
|
|
73
81
|
"key": "vibration",
|
|
74
82
|
"title": "Vibrating the device"
|
|
@@ -4167,7 +4175,1004 @@
|
|
|
4167
4175
|
"group": "analytics",
|
|
4168
4176
|
"signature": "readonly rejected: readonly AnalyticsRejection[]",
|
|
4169
4177
|
"documented": true,
|
|
4170
|
-
"summary": "Every event the platform refused, by index into the batch that was sent.\n\n⚠️ REJECTIONS ARRIVE INSIDE A 200, never as a thrown error, and the\naccepted events in the same batch were still written. An empty array is\nthe ordinary case.",
|
|
4178
|
+
"summary": "Every event the platform refused, by index into the batch that was sent.\n\n⚠️ REJECTIONS ARRIVE INSIDE A 200, never as a thrown error, and the\naccepted events in the same batch were still written. An empty array is\nthe ordinary case.",
|
|
4179
|
+
"deprecated": null,
|
|
4180
|
+
"params": [],
|
|
4181
|
+
"returns": null,
|
|
4182
|
+
"throws": null,
|
|
4183
|
+
"example": null,
|
|
4184
|
+
"defaultValue": null,
|
|
4185
|
+
"guides": []
|
|
4186
|
+
},
|
|
4187
|
+
{
|
|
4188
|
+
"id": "AnalyticsFlushResult.dropped",
|
|
4189
|
+
"name": "dropped",
|
|
4190
|
+
"anchor": "analyticsflushresult-dropped",
|
|
4191
|
+
"group": "analytics",
|
|
4192
|
+
"signature": "readonly dropped: number",
|
|
4193
|
+
"documented": true,
|
|
4194
|
+
"summary": "How many events the local queue threw away since the last successful\nflush, because it was full. The oldest go first.\n\nA number worth alarming on: it is nonzero only when the game is producing\nevents faster than the platform accepts them.",
|
|
4195
|
+
"deprecated": null,
|
|
4196
|
+
"params": [],
|
|
4197
|
+
"returns": null,
|
|
4198
|
+
"throws": null,
|
|
4199
|
+
"example": null,
|
|
4200
|
+
"defaultValue": null,
|
|
4201
|
+
"guides": []
|
|
4202
|
+
},
|
|
4203
|
+
{
|
|
4204
|
+
"id": "AnalyticsFlushResult.duplicate",
|
|
4205
|
+
"name": "duplicate",
|
|
4206
|
+
"anchor": "analyticsflushresult-duplicate",
|
|
4207
|
+
"group": "analytics",
|
|
4208
|
+
"signature": "readonly duplicate: boolean",
|
|
4209
|
+
"documented": true,
|
|
4210
|
+
"summary": "True when the platform had already seen this batch and wrote nothing.\n\nA retry that the first attempt had in fact delivered. Not an error — it is\nwhat stops a flush racing a `pagehide` from being counted twice — and\n`accepted` is 0 on one.",
|
|
4211
|
+
"deprecated": null,
|
|
4212
|
+
"params": [],
|
|
4213
|
+
"returns": null,
|
|
4214
|
+
"throws": null,
|
|
4215
|
+
"example": null,
|
|
4216
|
+
"defaultValue": null,
|
|
4217
|
+
"guides": []
|
|
4218
|
+
},
|
|
4219
|
+
{
|
|
4220
|
+
"id": "AnalyticsFlushOptions",
|
|
4221
|
+
"name": "AnalyticsFlushOptions",
|
|
4222
|
+
"anchor": "analyticsflushoptions",
|
|
4223
|
+
"group": "analytics",
|
|
4224
|
+
"signature": "interface AnalyticsFlushOptions",
|
|
4225
|
+
"documented": true,
|
|
4226
|
+
"summary": "What [AnalyticsApi.flush](api-reference-game.md#analyticsapi-flush) takes.",
|
|
4227
|
+
"deprecated": null,
|
|
4228
|
+
"params": [],
|
|
4229
|
+
"returns": null,
|
|
4230
|
+
"throws": null,
|
|
4231
|
+
"example": null,
|
|
4232
|
+
"defaultValue": null,
|
|
4233
|
+
"guides": []
|
|
4234
|
+
},
|
|
4235
|
+
{
|
|
4236
|
+
"id": "AnalyticsFlushOptions.keepalive",
|
|
4237
|
+
"name": "keepalive",
|
|
4238
|
+
"anchor": "analyticsflushoptions-keepalive",
|
|
4239
|
+
"group": "analytics",
|
|
4240
|
+
"signature": "readonly keepalive?: boolean",
|
|
4241
|
+
"documented": true,
|
|
4242
|
+
"summary": "Let the request outlive a page that is going away.\n\nFor the last flush before the player leaves. The browser caps how much can\nbe in flight this way and shares that cap with everything else the SDK\nsends on the way out, so a keepalive flush sends a SMALLER batch and\nleaves the rest queued — which on a closing page means leaving it behind.",
|
|
4243
|
+
"deprecated": null,
|
|
4244
|
+
"params": [],
|
|
4245
|
+
"returns": null,
|
|
4246
|
+
"throws": null,
|
|
4247
|
+
"example": null,
|
|
4248
|
+
"defaultValue": null,
|
|
4249
|
+
"guides": []
|
|
4250
|
+
},
|
|
4251
|
+
{
|
|
4252
|
+
"id": "AnalyticsFlushOptions.signal",
|
|
4253
|
+
"name": "signal",
|
|
4254
|
+
"anchor": "analyticsflushoptions-signal",
|
|
4255
|
+
"group": "analytics",
|
|
4256
|
+
"signature": "readonly signal?: AbortSignal",
|
|
4257
|
+
"documented": true,
|
|
4258
|
+
"summary": "Cancel the flush.",
|
|
4259
|
+
"deprecated": null,
|
|
4260
|
+
"params": [],
|
|
4261
|
+
"returns": null,
|
|
4262
|
+
"throws": null,
|
|
4263
|
+
"example": null,
|
|
4264
|
+
"defaultValue": null,
|
|
4265
|
+
"guides": []
|
|
4266
|
+
},
|
|
4267
|
+
{
|
|
4268
|
+
"id": "AnalyticsOptions",
|
|
4269
|
+
"name": "AnalyticsOptions",
|
|
4270
|
+
"anchor": "analyticsoptions",
|
|
4271
|
+
"group": "analytics",
|
|
4272
|
+
"signature": "interface AnalyticsOptions",
|
|
4273
|
+
"documented": true,
|
|
4274
|
+
"summary": "What `GemOptions.analytics` takes. Every field has a working default.",
|
|
4275
|
+
"deprecated": null,
|
|
4276
|
+
"params": [],
|
|
4277
|
+
"returns": null,
|
|
4278
|
+
"throws": null,
|
|
4279
|
+
"example": null,
|
|
4280
|
+
"defaultValue": null,
|
|
4281
|
+
"guides": []
|
|
4282
|
+
},
|
|
4283
|
+
{
|
|
4284
|
+
"id": "AnalyticsOptions.enabled",
|
|
4285
|
+
"name": "enabled",
|
|
4286
|
+
"anchor": "analyticsoptions-enabled",
|
|
4287
|
+
"group": "analytics",
|
|
4288
|
+
"signature": "readonly enabled?: boolean",
|
|
4289
|
+
"documented": true,
|
|
4290
|
+
"summary": "Turn tracking off without removing your `track` calls, which become\nno-ops. The namespace is still there and the platform's own `gem_*`\nevents still go out. Defaults to on.",
|
|
4291
|
+
"deprecated": null,
|
|
4292
|
+
"params": [],
|
|
4293
|
+
"returns": null,
|
|
4294
|
+
"throws": null,
|
|
4295
|
+
"example": null,
|
|
4296
|
+
"defaultValue": null,
|
|
4297
|
+
"guides": []
|
|
4298
|
+
},
|
|
4299
|
+
{
|
|
4300
|
+
"id": "AnalyticsOptions.flushIntervalMs",
|
|
4301
|
+
"name": "flushIntervalMs",
|
|
4302
|
+
"anchor": "analyticsoptions-flushintervalms",
|
|
4303
|
+
"group": "analytics",
|
|
4304
|
+
"signature": "readonly flushIntervalMs?: number",
|
|
4305
|
+
"documented": true,
|
|
4306
|
+
"summary": "How often the queue is flushed, in milliseconds. Defaults to 10 000, and\nis FLOORED at 10 000 — the platform rate-limits this route at 12 requests per\nminute per player, and a shorter interval spends that budget for nothing.\n\nA full queue does not wait for this: 50 events flush at once.",
|
|
4307
|
+
"deprecated": null,
|
|
4308
|
+
"params": [],
|
|
4309
|
+
"returns": null,
|
|
4310
|
+
"throws": null,
|
|
4311
|
+
"example": null,
|
|
4312
|
+
"defaultValue": null,
|
|
4313
|
+
"guides": []
|
|
4314
|
+
},
|
|
4315
|
+
{
|
|
4316
|
+
"id": "AnalyticsOptions.maxQueue",
|
|
4317
|
+
"name": "maxQueue",
|
|
4318
|
+
"anchor": "analyticsoptions-maxqueue",
|
|
4319
|
+
"group": "analytics",
|
|
4320
|
+
"signature": "readonly maxQueue?: number",
|
|
4321
|
+
"documented": true,
|
|
4322
|
+
"summary": "How many events may wait in memory. Defaults to 500. Past it the OLDEST\nare discarded and counted in [AnalyticsFlushResult.dropped](api-reference-game.md#analyticsflushresult-dropped) — the\nnewest events are the ones a developer is looking at.",
|
|
4323
|
+
"deprecated": null,
|
|
4324
|
+
"params": [],
|
|
4325
|
+
"returns": null,
|
|
4326
|
+
"throws": null,
|
|
4327
|
+
"example": null,
|
|
4328
|
+
"defaultValue": null,
|
|
4329
|
+
"guides": []
|
|
4330
|
+
},
|
|
4331
|
+
{
|
|
4332
|
+
"id": "AnalyticsApi",
|
|
4333
|
+
"name": "AnalyticsApi",
|
|
4334
|
+
"anchor": "analyticsapi",
|
|
4335
|
+
"group": "analytics",
|
|
4336
|
+
"signature": "class AnalyticsApi",
|
|
4337
|
+
"documented": true,
|
|
4338
|
+
"summary": "Your game's own analytics — the events you declared in your game config,\nplus the `gem_*` session and match events the SDK emits for you.\n\nReached as `gem.analytics`. [AnalyticsApi.track](api-reference-game.md#analyticsapi-track) is synchronous, never\nthrows and never rejects: it puts an event on an in-memory queue, and the\nSDK posts that queue on its own timer, when it reaches 50 events, and on the\nway out of the page.\n\n```js\ngem.analytics.setContext({ build: 'v1.4.2' });\n\ngem.analytics.track('level_completed', {\n outcome: 'win', // a dimension — a declared, closed set\n difficulty: 'normal', // a dimension\n duration_ms: 48_120, // a measure — summed, averaged, min and max\n score: 3_100, // a measure\n});\n```\n\n⚠️ **Every key has to be declared.** `analytics_events` in your game config\nis what says which events exist, which dimensions each has and which values\neach dimension may take. An undeclared name or key is not stored — it comes\nback as a rejection, which the SDK prints to the console during development.\n\n⚠️ **Detail older than 60 days is gone.** Raw events live 60 days; the daily\ncounters live 400. Anything you want to be able to ask about a year from now\nhas to be a declared dimension today.\n\n⚠️ **These are your numbers, not the platform's.** Client events are\ngame-asserted browser facts. They feed your analytics and nothing the\nplatform treats as authoritative — not rewards, not dailies, not store\nranking.",
|
|
4339
|
+
"deprecated": null,
|
|
4340
|
+
"params": [],
|
|
4341
|
+
"returns": null,
|
|
4342
|
+
"throws": null,
|
|
4343
|
+
"example": null,
|
|
4344
|
+
"defaultValue": null,
|
|
4345
|
+
"guides": [
|
|
4346
|
+
{
|
|
4347
|
+
"slug": "analytics",
|
|
4348
|
+
"anchor": null
|
|
4349
|
+
}
|
|
4350
|
+
]
|
|
4351
|
+
},
|
|
4352
|
+
{
|
|
4353
|
+
"id": "AnalyticsApi.track",
|
|
4354
|
+
"name": "track",
|
|
4355
|
+
"anchor": "analyticsapi-track",
|
|
4356
|
+
"group": "analytics",
|
|
4357
|
+
"signature": "track(name: string, props?: Readonly<Record<string, AnalyticsValue>>): void",
|
|
4358
|
+
"documented": true,
|
|
4359
|
+
"summary": "Record an event. Synchronous, and it never throws.\n\nString values become dimensions and numbers become measures, matched\nagainst your `analytics_events` declaration server-side. Nothing is sent\nyet: the event joins a queue that goes out on a timer, at 50 events, and\non the way out of the page.\n\n⚠️ `gem_` IS RESERVED. The SDK emits the platform's own events itself, so\na name starting `gem_` is refused here rather than sent and rejected\nthere.",
|
|
4360
|
+
"deprecated": null,
|
|
4361
|
+
"params": [
|
|
4362
|
+
{
|
|
4363
|
+
"name": "name",
|
|
4364
|
+
"type": "string",
|
|
4365
|
+
"optional": false,
|
|
4366
|
+
"summary": "A declared event id — the `id` of an entry in your config's\n `analytics_events`."
|
|
4367
|
+
},
|
|
4368
|
+
{
|
|
4369
|
+
"name": "props",
|
|
4370
|
+
"type": "Readonly<Record<string, AnalyticsValue>>",
|
|
4371
|
+
"optional": false,
|
|
4372
|
+
"summary": "Dimensions (strings) and measures (numbers), merged over\n whatever [AnalyticsApi.setContext](api-reference-game.md#analyticsapi-setcontext) holds."
|
|
4373
|
+
}
|
|
4374
|
+
],
|
|
4375
|
+
"returns": null,
|
|
4376
|
+
"throws": null,
|
|
4377
|
+
"example": null,
|
|
4378
|
+
"defaultValue": null,
|
|
4379
|
+
"guides": []
|
|
4380
|
+
},
|
|
4381
|
+
{
|
|
4382
|
+
"id": "AnalyticsApi.setContext",
|
|
4383
|
+
"name": "setContext",
|
|
4384
|
+
"anchor": "analyticsapi-setcontext",
|
|
4385
|
+
"group": "analytics",
|
|
4386
|
+
"signature": "setContext(props: Readonly<Record<string, AnalyticsValue>>): void",
|
|
4387
|
+
"documented": true,
|
|
4388
|
+
"summary": "Merge values into every event **you** record after this call.\n\nWhat keeps a build marker or a difficulty setting off every call site. An\nevent's own `props` win over context for the same key.\n\n⚠️ Context keys are declared like any other: a key here that your\n`analytics_events` entry does not carry is rejected on every event it\nreaches, not just the one you were thinking of.\n\n⚠️ **CONTEXT IS NOT GLOBAL — it reaches your `track` calls and never the\nplatform's own `gem_*` events.** Their dimensions are fixed by the platform\nand no config can widen them, so a context key on one would refuse the\nwhole event rather than annotate it. Session, pause, boot, match and\nauth-lost events therefore carry exactly what the platform declares for\nthem, whatever you set here.",
|
|
4389
|
+
"deprecated": null,
|
|
4390
|
+
"params": [
|
|
4391
|
+
{
|
|
4392
|
+
"name": "props",
|
|
4393
|
+
"type": "Readonly<Record<string, AnalyticsValue>>",
|
|
4394
|
+
"optional": false,
|
|
4395
|
+
"summary": null
|
|
4396
|
+
}
|
|
4397
|
+
],
|
|
4398
|
+
"returns": null,
|
|
4399
|
+
"throws": null,
|
|
4400
|
+
"example": null,
|
|
4401
|
+
"defaultValue": null,
|
|
4402
|
+
"guides": []
|
|
4403
|
+
},
|
|
4404
|
+
{
|
|
4405
|
+
"id": "AnalyticsApi.experiment",
|
|
4406
|
+
"name": "experiment",
|
|
4407
|
+
"anchor": "analyticsapi-experiment",
|
|
4408
|
+
"group": "analytics",
|
|
4409
|
+
"signature": "experiment(key: string, count: number): Promise<number>",
|
|
4410
|
+
"documented": true,
|
|
4411
|
+
"summary": "Which arm of one of your experiments this player gets — the same answer on\nevery call, every refresh and every device. Use it wherever you would have\npicked an arm with `Math.random()`, which deals a player a new arm on each\nvisit and makes the test unreadable.\n\nPass a COUNT and get an index, `0` to `count - 1`; pass a LIST of strings\nand get one of them. A string listed twice is twice as likely.\n\n```js\nconst tutorial = await gem.analytics.experiment('tutorial_length', ['short', 'long']);\nconst layout = await gem.analytics.experiment('shop_layout', 3); // 0, 1 or 2\n```\n\nThe selection is a hash of the key and the signed-in player's id — FNV-1a\n32-bit over `\"<key>:<playerId>\"`, then MurmurHash3's 32-bit finalizer, mod\nthe arm count; see\n[experimentSelection](api-reference-game.md#experimentselection), which computes the same answer for an id you\nhold. Hashing the key in is what keeps your experiments independent: the\nplayers in one experiment's first arm are not the same players in every\nother experiment's first arm.\n\n⚠️ **Keep the key and the arms fixed for the life of the experiment.** A new\ncount or list re-deals every player. To start over on purpose, use a new\nkey.\n\n⚠️ **NOTHING IS RECORDED FOR YOU.** The selection is not sent anywhere, and\nthe SDK does not add it to your events. To analyse an experiment, declare a\ndimension for it on the events you want to break down, with the arms as its\nvalues, named after the experiment, and pass the selection there yourself:\n`gem.analytics.track('tutorial_finished', { tutorial_length: tutorial })`.\nNever the platform's `variant` field, which belongs to store-page\nexperiments.\n\nWAITS FOR THE PLAYER. The id arrives with the first play token, so a call\nduring boot waits for it, and rejects as [Gem.awaitIdentity](api-reference-game.md#gem-awaitidentity) does\nwhen none arrives — outside the Arcade, the Gem Editor or the dev host.\nThere is no random fallback: catch the rejection and play your control arm.\nA guest is selected by their guest id, which is stable for as long as their\nguest account lasts; once they sign in to an account they are that\naccount's player, and its selection applies.\n\nIn a serverless function it selects for the player who invoked it, with\nno wait, and rejects when a game server invoked it.\n\nWorks with analytics turned off: it reads no setting and sends nothing.",
|
|
4412
|
+
"deprecated": null,
|
|
4413
|
+
"params": [
|
|
4414
|
+
{
|
|
4415
|
+
"name": "key",
|
|
4416
|
+
"type": "string",
|
|
4417
|
+
"optional": false,
|
|
4418
|
+
"summary": "Names the experiment — any non-empty string."
|
|
4419
|
+
},
|
|
4420
|
+
{
|
|
4421
|
+
"name": "count",
|
|
4422
|
+
"type": "number",
|
|
4423
|
+
"optional": false,
|
|
4424
|
+
"summary": "How many arms, an integer from 1 to 2048 — or, in the list\n form, `options`: the arms themselves, 1 to 2048 strings."
|
|
4425
|
+
}
|
|
4426
|
+
],
|
|
4427
|
+
"returns": "The arm's index, or the chosen string.",
|
|
4428
|
+
"throws": "TypeError for an empty key or a list holding something other than\n strings; RangeError for a count or list size outside 1 to 2048. Both\n reject before waiting for the player.",
|
|
4429
|
+
"example": null,
|
|
4430
|
+
"defaultValue": null,
|
|
4431
|
+
"guides": []
|
|
4432
|
+
},
|
|
4433
|
+
{
|
|
4434
|
+
"id": "AnalyticsApi.environment",
|
|
4435
|
+
"name": "environment",
|
|
4436
|
+
"anchor": "analyticsapi-environment",
|
|
4437
|
+
"group": "analytics",
|
|
4438
|
+
"signature": "get environment(): Readonly<Record<string, string>>",
|
|
4439
|
+
"documented": true,
|
|
4440
|
+
"summary": "What the SDK knows about the build this session is running — `sdk_version`,\nand `game_version` when you passed `clientVersion` to `createGem`.\n\n⚠️ **THE SDK DOES NOT STAMP THESE ONTO YOUR EVENTS, and the reason is not\ntimidity.** The platform validates every property of every event against your\n`analytics_events` declaration and refuses the WHOLE EVENT over a key it\ndoes not carry — so an SDK that merged `sdk_version` into context would get\nevery event of every game that had not declared that dimension rejected\n`unknown_dimension`, including the platform's own `gem_*` events, whose\ndimensions are fixed. Only your config can declare a dimension, so only you\ncan turn these on:\n\n```js\n// with sdk_version and game_version declared on the events that want them\ngem.analytics.setContext(gem.analytics.environment);\n```\n\nEvery dimension costs cardinality — the product of an event's dimension\nsizes is capped — so declare them on the handful of events where knowing\nwhich build produced a number is worth it, rather than on all of them.",
|
|
4441
|
+
"deprecated": null,
|
|
4442
|
+
"params": [],
|
|
4443
|
+
"returns": null,
|
|
4444
|
+
"throws": null,
|
|
4445
|
+
"example": null,
|
|
4446
|
+
"defaultValue": null,
|
|
4447
|
+
"guides": []
|
|
4448
|
+
},
|
|
4449
|
+
{
|
|
4450
|
+
"id": "AnalyticsApi.flush",
|
|
4451
|
+
"name": "flush",
|
|
4452
|
+
"anchor": "analyticsapi-flush",
|
|
4453
|
+
"group": "analytics",
|
|
4454
|
+
"signature": "flush(options?: AnalyticsFlushOptions): Promise<AnalyticsFlushResult>",
|
|
4455
|
+
"documented": true,
|
|
4456
|
+
"summary": "Send what is queued now, and find out what happened to it.\n\nResolves with the platform's own answer, INCLUDING per-event rejections, which\narrive inside a 200 — see [AnalyticsFlushResult.rejected](api-reference-game.md#analyticsflushresult-rejected). You do\nnot have to call this: the SDK flushes on its own, and on the way out of\nthe page.\n\nA refusal that could clear on its own — a 429 from the rate limiter, a 503\nwhile the platform's idempotency store is unreachable — KEEPS the queue\nand rejects, so the next flush sends the same events rather than losing\nthem. The SDK's own flushes then hold off for the longer of the server's\n`Retry-After` and a cooldown that doubles from 10 seconds, up to five\nminutes. A refusal that cannot clear discards the batch it was sent for,\nbecause resending it can only fail identically.\n\nOne flush at a time: called while another is still on the wire, this\nresolves at once with nothing sent, and what is queued goes out after it.",
|
|
4457
|
+
"deprecated": null,
|
|
4458
|
+
"params": [
|
|
4459
|
+
{
|
|
4460
|
+
"name": "options",
|
|
4461
|
+
"type": "AnalyticsFlushOptions",
|
|
4462
|
+
"optional": false,
|
|
4463
|
+
"summary": null
|
|
4464
|
+
}
|
|
4465
|
+
],
|
|
4466
|
+
"returns": null,
|
|
4467
|
+
"throws": "[GemApiError](api-reference-game.md#gemapierror) on a refusal.",
|
|
4468
|
+
"example": null,
|
|
4469
|
+
"defaultValue": null,
|
|
4470
|
+
"guides": []
|
|
4471
|
+
},
|
|
4472
|
+
{
|
|
4473
|
+
"id": "SessionEndReason",
|
|
4474
|
+
"name": "SessionEndReason",
|
|
4475
|
+
"anchor": "sessionendreason",
|
|
4476
|
+
"group": "analytics",
|
|
4477
|
+
"signature": "type SessionEndReason = \"grant_expiring\" | \"session_ended\" | \"navigating\" | \"kill_switch\" | \"pagehide\"",
|
|
4478
|
+
"documented": true,
|
|
4479
|
+
"summary": "Why a play session ended.\n\nThe closed set `gem_session_end` is broken down by. A value outside it is\nrejected as `dimension_value_not_declared`.\n\n⚠️ `pagehide` is the BEST-EFFORT one. The keepalive flush that carries it is\na browser budget, not a guarantee, so `duration_ms` on a `pagehide` end is\nthe reading a funnel should treat as approximate.",
|
|
4480
|
+
"deprecated": null,
|
|
4481
|
+
"params": [],
|
|
4482
|
+
"returns": null,
|
|
4483
|
+
"throws": null,
|
|
4484
|
+
"example": null,
|
|
4485
|
+
"defaultValue": null,
|
|
4486
|
+
"guides": []
|
|
4487
|
+
},
|
|
4488
|
+
{
|
|
4489
|
+
"id": "MatchTransport",
|
|
4490
|
+
"name": "MatchTransport",
|
|
4491
|
+
"anchor": "matchtransport",
|
|
4492
|
+
"group": "analytics",
|
|
4493
|
+
"signature": "type MatchTransport = \"dedicated\" | \"p2p\"",
|
|
4494
|
+
"documented": true,
|
|
4495
|
+
"summary": "How a match was hosted — the closed set `gem_match_started` and\n`gem_match_ended` are broken down by.",
|
|
4496
|
+
"deprecated": null,
|
|
4497
|
+
"params": [],
|
|
4498
|
+
"returns": null,
|
|
4499
|
+
"throws": null,
|
|
4500
|
+
"example": null,
|
|
4501
|
+
"defaultValue": null,
|
|
4502
|
+
"guides": []
|
|
4503
|
+
},
|
|
4504
|
+
{
|
|
4505
|
+
"id": "PlatformEventName",
|
|
4506
|
+
"name": "PlatformEventName",
|
|
4507
|
+
"anchor": "platformeventname",
|
|
4508
|
+
"group": "analytics",
|
|
4509
|
+
"signature": "type PlatformEventName = \"gem_session_start\" | \"gem_session_end\" | \"gem_pause\" | \"gem_resume\" | \"gem_boot_ready\" | \"gem_match_started\" | \"gem_match_ended\" | \"gem_auth_lost\"",
|
|
4510
|
+
"documented": true,
|
|
4511
|
+
"summary": "Every event the SDK emits by itself.\n\nA game never sends these — `gem.analytics.track` refuses the whole\n`gem_` namespace — but the names are published because a game reading its\nown funnel needs the vocabulary, and because a funnel declared in the game\nconfig names them as steps.\n\n| Event | Dimensions | Measures |\n|---|---|---|\n| `gem_session_start` | — | — |\n| `gem_session_end` | `reason` ([SessionEndReason](api-reference-game.md#sessionendreason)) | `duration_ms` |\n| `gem_pause` / `gem_resume` | — | — |\n| `gem_boot_ready` | — | `boot_ms` |\n| `gem_match_started` / `gem_match_ended` | `transport` ([MatchTransport](api-reference-game.md#matchtransport)) | — |\n| `gem_auth_lost` | — | — |",
|
|
4512
|
+
"deprecated": null,
|
|
4513
|
+
"params": [],
|
|
4514
|
+
"returns": null,
|
|
4515
|
+
"throws": null,
|
|
4516
|
+
"example": null,
|
|
4517
|
+
"defaultValue": null,
|
|
4518
|
+
"guides": []
|
|
4519
|
+
},
|
|
4520
|
+
{
|
|
4521
|
+
"id": "PLATFORM_EVENTS",
|
|
4522
|
+
"name": "PLATFORM_EVENTS",
|
|
4523
|
+
"anchor": "platform_events",
|
|
4524
|
+
"group": "analytics",
|
|
4525
|
+
"signature": "PLATFORM_EVENTS: readonly PlatformEventName[]",
|
|
4526
|
+
"documented": true,
|
|
4527
|
+
"summary": "The platform event names, as a list.\n\nThe runtime companion to [PlatformEventName](api-reference-game.md#platformeventname), for a game that wants to\nshow what it gets for free, or to check a funnel step it authored against\nwhat the platform actually emits.",
|
|
4528
|
+
"deprecated": null,
|
|
4529
|
+
"params": [],
|
|
4530
|
+
"returns": null,
|
|
4531
|
+
"throws": null,
|
|
4532
|
+
"example": null,
|
|
4533
|
+
"defaultValue": null,
|
|
4534
|
+
"guides": []
|
|
4535
|
+
},
|
|
4536
|
+
{
|
|
4537
|
+
"id": "experimentSelection",
|
|
4538
|
+
"name": "experimentSelection",
|
|
4539
|
+
"anchor": "experimentselection",
|
|
4540
|
+
"group": "analytics",
|
|
4541
|
+
"signature": "function experimentSelection(key: string, playerId: string, count: number): number",
|
|
4542
|
+
"documented": true,
|
|
4543
|
+
"summary": "Which arm of an experiment a player gets — the same answer for the same key\nand player, every time, anywhere.\n\nIn a game, call [AnalyticsApi.experiment](api-reference-game.md#analyticsapi-experiment) instead: it is this, with\nthe signed-in player's id filled in. This form takes the id, for code that\nhas one in hand — a dedicated server reproducing what a member's client\npicked, or a test.\n\nPass a COUNT and get an index, `0` to `count - 1`; pass a LIST of strings\nand get one of them. A string listed twice is twice as likely, which is how\nto weight an arm.\n\nThe answer is `fmix32(fnv1a32(\"<key>:<playerId>\")) % count`: FNV-1a 32-bit\nover the UTF-8 bytes of the key, a colon and the player id, then\nMurmurHash3's 32-bit finalizer, as an unsigned integer — with a list, the\nindex into it. The hash is fixed, so any other language can reproduce a\nselection; docs/analytics.md has it written out.\n\n⚠️ **Keep the key and the arms fixed for the life of the experiment.** A new\ncount or list re-deals every player. To start over on purpose, use a new\nkey.",
|
|
4544
|
+
"deprecated": null,
|
|
4545
|
+
"params": [
|
|
4546
|
+
{
|
|
4547
|
+
"name": "key",
|
|
4548
|
+
"type": "string",
|
|
4549
|
+
"optional": false,
|
|
4550
|
+
"summary": "Names the experiment — any non-empty string, and the only thing\n that makes one experiment's split independent of another's."
|
|
4551
|
+
},
|
|
4552
|
+
{
|
|
4553
|
+
"name": "playerId",
|
|
4554
|
+
"type": "string",
|
|
4555
|
+
"optional": false,
|
|
4556
|
+
"summary": "The player to select for — [GemIdentity.playerId](api-reference-game.md#gemidentity-playerid)."
|
|
4557
|
+
},
|
|
4558
|
+
{
|
|
4559
|
+
"name": "count",
|
|
4560
|
+
"type": "number",
|
|
4561
|
+
"optional": false,
|
|
4562
|
+
"summary": "How many arms, an integer from 1 to 2048 — or, in the list\n form, `options`: the arms themselves, 1 to 2048 strings."
|
|
4563
|
+
}
|
|
4564
|
+
],
|
|
4565
|
+
"returns": null,
|
|
4566
|
+
"throws": "TypeError for an empty key or player id, or a list holding something\n other than strings; RangeError for a count or list size outside 1 to 2048.",
|
|
4567
|
+
"example": null,
|
|
4568
|
+
"defaultValue": null,
|
|
4569
|
+
"guides": []
|
|
4570
|
+
},
|
|
4571
|
+
{
|
|
4572
|
+
"id": "AppStore",
|
|
4573
|
+
"name": "AppStore",
|
|
4574
|
+
"anchor": "appstore",
|
|
4575
|
+
"group": "arcade",
|
|
4576
|
+
"signature": "type AppStore = \"app_store\" | \"google_play\"",
|
|
4577
|
+
"documented": true,
|
|
4578
|
+
"summary": "Which app store a listing is in, so a game can draw the matching badge.",
|
|
4579
|
+
"deprecated": null,
|
|
4580
|
+
"params": [],
|
|
4581
|
+
"returns": null,
|
|
4582
|
+
"throws": null,
|
|
4583
|
+
"example": null,
|
|
4584
|
+
"defaultValue": null,
|
|
4585
|
+
"guides": []
|
|
4586
|
+
},
|
|
4587
|
+
{
|
|
4588
|
+
"id": "AppListing",
|
|
4589
|
+
"name": "AppListing",
|
|
4590
|
+
"anchor": "applisting",
|
|
4591
|
+
"group": "arcade",
|
|
4592
|
+
"signature": "interface AppListing",
|
|
4593
|
+
"documented": true,
|
|
4594
|
+
"summary": "A store listing the arcade can open from here.",
|
|
4595
|
+
"deprecated": null,
|
|
4596
|
+
"params": [],
|
|
4597
|
+
"returns": null,
|
|
4598
|
+
"throws": null,
|
|
4599
|
+
"example": null,
|
|
4600
|
+
"defaultValue": null,
|
|
4601
|
+
"guides": []
|
|
4602
|
+
},
|
|
4603
|
+
{
|
|
4604
|
+
"id": "AppListing.store",
|
|
4605
|
+
"name": "store",
|
|
4606
|
+
"anchor": "applisting-store",
|
|
4607
|
+
"group": "arcade",
|
|
4608
|
+
"signature": "readonly store: AppStore",
|
|
4609
|
+
"documented": true,
|
|
4610
|
+
"summary": "Which store it is in. Never a URL: the arcade builds the link.",
|
|
4611
|
+
"deprecated": null,
|
|
4612
|
+
"params": [],
|
|
4613
|
+
"returns": null,
|
|
4614
|
+
"throws": null,
|
|
4615
|
+
"example": null,
|
|
4616
|
+
"defaultValue": null,
|
|
4617
|
+
"guides": []
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
"id": "AppLinksOutcome",
|
|
4621
|
+
"name": "AppLinksOutcome",
|
|
4622
|
+
"anchor": "applinksoutcome",
|
|
4623
|
+
"group": "arcade",
|
|
4624
|
+
"signature": "interface AppLinksOutcome",
|
|
4625
|
+
"documented": true,
|
|
4626
|
+
"summary": "What [ArcadeApi.appLinks](api-reference-game.md#arcadeapi-applinks) resolves with. `arcade` and `game` are each\npresent only when [ArcadeApi.openApp](api-reference-game.md#arcadeapi-openapp) with that target would open a\nlisting here; show the matching button only then.",
|
|
4627
|
+
"deprecated": null,
|
|
4628
|
+
"params": [],
|
|
4629
|
+
"returns": null,
|
|
4630
|
+
"throws": null,
|
|
4631
|
+
"example": null,
|
|
4632
|
+
"defaultValue": null,
|
|
4633
|
+
"guides": []
|
|
4634
|
+
},
|
|
4635
|
+
{
|
|
4636
|
+
"id": "AppLinksOutcome.arcade",
|
|
4637
|
+
"name": "arcade",
|
|
4638
|
+
"anchor": "applinksoutcome-arcade",
|
|
4639
|
+
"group": "arcade",
|
|
4640
|
+
"signature": "readonly arcade?: AppListing",
|
|
4641
|
+
"documented": true,
|
|
4642
|
+
"summary": "The Gem Arcade app's listing. Absent inside the Gem Arcade app itself.",
|
|
4643
|
+
"deprecated": null,
|
|
4644
|
+
"params": [],
|
|
4645
|
+
"returns": null,
|
|
4646
|
+
"throws": null,
|
|
4647
|
+
"example": null,
|
|
4648
|
+
"defaultValue": null,
|
|
4649
|
+
"guides": []
|
|
4650
|
+
},
|
|
4651
|
+
{
|
|
4652
|
+
"id": "AppLinksOutcome.game",
|
|
4653
|
+
"name": "game",
|
|
4654
|
+
"anchor": "applinksoutcome-game",
|
|
4655
|
+
"group": "arcade",
|
|
4656
|
+
"signature": "readonly game?: AppListing",
|
|
4657
|
+
"documented": true,
|
|
4658
|
+
"summary": "This game's own app's listing, when it has one for this platform.",
|
|
4659
|
+
"deprecated": null,
|
|
4660
|
+
"params": [],
|
|
4661
|
+
"returns": null,
|
|
4662
|
+
"throws": null,
|
|
4663
|
+
"example": null,
|
|
4664
|
+
"defaultValue": null,
|
|
4665
|
+
"guides": []
|
|
4666
|
+
},
|
|
4667
|
+
{
|
|
4668
|
+
"id": "AppLinksOutcome.outcome",
|
|
4669
|
+
"name": "outcome",
|
|
4670
|
+
"anchor": "applinksoutcome-outcome",
|
|
4671
|
+
"group": "arcade",
|
|
4672
|
+
"signature": "readonly outcome: ArcadeOutcomeKind",
|
|
4673
|
+
"documented": true,
|
|
4674
|
+
"summary": "What happened: `ok`, `declined` or `unavailable`. Branch on this.",
|
|
4675
|
+
"deprecated": null,
|
|
4676
|
+
"params": [],
|
|
4677
|
+
"returns": null,
|
|
4678
|
+
"throws": null,
|
|
4679
|
+
"example": null,
|
|
4680
|
+
"defaultValue": null,
|
|
4681
|
+
"guides": []
|
|
4682
|
+
},
|
|
4683
|
+
{
|
|
4684
|
+
"id": "AppLinksOutcome.reason",
|
|
4685
|
+
"name": "reason",
|
|
4686
|
+
"anchor": "applinksoutcome-reason",
|
|
4687
|
+
"group": "arcade",
|
|
4688
|
+
"signature": "readonly reason?: string",
|
|
4689
|
+
"documented": true,
|
|
4690
|
+
"summary": "Why, as a machine code — `busy`, `cancelled`, `not_found`, `pending`,\n`store_off`, `sign_in_required` and more. OPEN-ENDED: the arcade may send a\ncode this SDK has never heard of, so keep a `default` arm and never show a\ncode to a player. Absent when there is nothing to add.\n\nThree are the SDK's own, answered without asking the arcade:\n`unsupported` (the arcade here does not offer this), `invalid_argument`\n(the SDK refused what you passed) and `busy` (another ask of the same kind\nis still open). `error` means no reliable answer arrived — the ask never\nleft, the wait ran out, the bridge closed or the arcade had none. For\n`gem.store.purchase` that makes the outcome UNKNOWN, not a refusal: the\nplayer may have paid.",
|
|
4691
|
+
"deprecated": null,
|
|
4692
|
+
"params": [],
|
|
4693
|
+
"returns": null,
|
|
4694
|
+
"throws": null,
|
|
4695
|
+
"example": null,
|
|
4696
|
+
"defaultValue": null,
|
|
4697
|
+
"guides": []
|
|
4698
|
+
},
|
|
4699
|
+
{
|
|
4700
|
+
"id": "GameCard",
|
|
4701
|
+
"name": "GameCard",
|
|
4702
|
+
"anchor": "gamecard",
|
|
4703
|
+
"group": "arcade",
|
|
4704
|
+
"signature": "interface GameCard",
|
|
4705
|
+
"documented": true,
|
|
4706
|
+
"summary": "One game, as an Arcade home tile shows it.\n\n⚠️ `name`, `tagline`, `shortDescription` and `tags` are **another\ndeveloper's text**, so they arrive as [PlayerText](api-reference-game.md#playertext): convert with\n`text.toPlain()` and render them as text, never as markup. The media URLs are\nthe platform's; your page's CSP must allow its media host for `img-src` and\n`media-src` (see `docs/arcade-and-store.md`).",
|
|
4707
|
+
"deprecated": null,
|
|
4708
|
+
"params": [],
|
|
4709
|
+
"returns": null,
|
|
4710
|
+
"throws": null,
|
|
4711
|
+
"example": null,
|
|
4712
|
+
"defaultValue": null,
|
|
4713
|
+
"guides": []
|
|
4714
|
+
},
|
|
4715
|
+
{
|
|
4716
|
+
"id": "GameCard.gameId",
|
|
4717
|
+
"name": "gameId",
|
|
4718
|
+
"anchor": "gamecard-gameid",
|
|
4719
|
+
"group": "arcade",
|
|
4720
|
+
"signature": "readonly gameId: string",
|
|
4721
|
+
"documented": true,
|
|
4722
|
+
"summary": "The game's id: what [ArcadeApi.openGame](api-reference-game.md#arcadeapi-opengame) takes.",
|
|
4723
|
+
"deprecated": null,
|
|
4724
|
+
"params": [],
|
|
4725
|
+
"returns": null,
|
|
4726
|
+
"throws": null,
|
|
4727
|
+
"example": null,
|
|
4728
|
+
"defaultValue": null,
|
|
4729
|
+
"guides": []
|
|
4730
|
+
},
|
|
4731
|
+
{
|
|
4732
|
+
"id": "GameCard.slug",
|
|
4733
|
+
"name": "slug",
|
|
4734
|
+
"anchor": "gamecard-slug",
|
|
4735
|
+
"group": "arcade",
|
|
4736
|
+
"signature": "readonly slug?: string",
|
|
4737
|
+
"documented": true,
|
|
4738
|
+
"summary": "The game's web address, when it has one.",
|
|
4739
|
+
"deprecated": null,
|
|
4740
|
+
"params": [],
|
|
4741
|
+
"returns": null,
|
|
4742
|
+
"throws": null,
|
|
4743
|
+
"example": null,
|
|
4744
|
+
"defaultValue": null,
|
|
4745
|
+
"guides": []
|
|
4746
|
+
},
|
|
4747
|
+
{
|
|
4748
|
+
"id": "GameCard.name",
|
|
4749
|
+
"name": "name",
|
|
4750
|
+
"anchor": "gamecard-name",
|
|
4751
|
+
"group": "arcade",
|
|
4752
|
+
"signature": "readonly name: PlayerText",
|
|
4753
|
+
"documented": true,
|
|
4754
|
+
"summary": "The game's public name. Another developer's text.",
|
|
4755
|
+
"deprecated": null,
|
|
4756
|
+
"params": [],
|
|
4757
|
+
"returns": null,
|
|
4758
|
+
"throws": null,
|
|
4759
|
+
"example": null,
|
|
4760
|
+
"defaultValue": null,
|
|
4761
|
+
"guides": []
|
|
4762
|
+
},
|
|
4763
|
+
{
|
|
4764
|
+
"id": "GameCard.tagline",
|
|
4765
|
+
"name": "tagline",
|
|
4766
|
+
"anchor": "gamecard-tagline",
|
|
4767
|
+
"group": "arcade",
|
|
4768
|
+
"signature": "readonly tagline: PlayerText",
|
|
4769
|
+
"documented": true,
|
|
4770
|
+
"summary": "One line under the name. Another developer's text; may be empty.",
|
|
4771
|
+
"deprecated": null,
|
|
4772
|
+
"params": [],
|
|
4773
|
+
"returns": null,
|
|
4774
|
+
"throws": null,
|
|
4775
|
+
"example": null,
|
|
4776
|
+
"defaultValue": null,
|
|
4777
|
+
"guides": []
|
|
4778
|
+
},
|
|
4779
|
+
{
|
|
4780
|
+
"id": "GameCard.shortDescription",
|
|
4781
|
+
"name": "shortDescription",
|
|
4782
|
+
"anchor": "gamecard-shortdescription",
|
|
4783
|
+
"group": "arcade",
|
|
4784
|
+
"signature": "readonly shortDescription: PlayerText",
|
|
4785
|
+
"documented": true,
|
|
4786
|
+
"summary": "A sentence or two. Another developer's text; may be empty.",
|
|
4787
|
+
"deprecated": null,
|
|
4788
|
+
"params": [],
|
|
4789
|
+
"returns": null,
|
|
4790
|
+
"throws": null,
|
|
4791
|
+
"example": null,
|
|
4792
|
+
"defaultValue": null,
|
|
4793
|
+
"guides": []
|
|
4794
|
+
},
|
|
4795
|
+
{
|
|
4796
|
+
"id": "GameCard.tags",
|
|
4797
|
+
"name": "tags",
|
|
4798
|
+
"anchor": "gamecard-tags",
|
|
4799
|
+
"group": "arcade",
|
|
4800
|
+
"signature": "readonly tags: readonly PlayerText[]",
|
|
4801
|
+
"documented": true,
|
|
4802
|
+
"summary": "The game's store tags. Another developer's text.",
|
|
4803
|
+
"deprecated": null,
|
|
4804
|
+
"params": [],
|
|
4805
|
+
"returns": null,
|
|
4806
|
+
"throws": null,
|
|
4807
|
+
"example": null,
|
|
4808
|
+
"defaultValue": null,
|
|
4809
|
+
"guides": []
|
|
4810
|
+
},
|
|
4811
|
+
{
|
|
4812
|
+
"id": "GameCard.iconUrl",
|
|
4813
|
+
"name": "iconUrl",
|
|
4814
|
+
"anchor": "gamecard-iconurl",
|
|
4815
|
+
"group": "arcade",
|
|
4816
|
+
"signature": "readonly iconUrl: string",
|
|
4817
|
+
"documented": true,
|
|
4818
|
+
"summary": "The game's icon.",
|
|
4819
|
+
"deprecated": null,
|
|
4820
|
+
"params": [],
|
|
4821
|
+
"returns": null,
|
|
4822
|
+
"throws": null,
|
|
4823
|
+
"example": null,
|
|
4824
|
+
"defaultValue": null,
|
|
4825
|
+
"guides": []
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
"id": "GameCard.capsuleLandscapeUrl",
|
|
4829
|
+
"name": "capsuleLandscapeUrl",
|
|
4830
|
+
"anchor": "gamecard-capsulelandscapeurl",
|
|
4831
|
+
"group": "arcade",
|
|
4832
|
+
"signature": "readonly capsuleLandscapeUrl: string",
|
|
4833
|
+
"documented": true,
|
|
4834
|
+
"summary": "The landscape tile art.",
|
|
4835
|
+
"deprecated": null,
|
|
4836
|
+
"params": [],
|
|
4837
|
+
"returns": null,
|
|
4838
|
+
"throws": null,
|
|
4839
|
+
"example": null,
|
|
4840
|
+
"defaultValue": null,
|
|
4841
|
+
"guides": []
|
|
4842
|
+
},
|
|
4843
|
+
{
|
|
4844
|
+
"id": "GameCard.capsulePortraitUrl",
|
|
4845
|
+
"name": "capsulePortraitUrl",
|
|
4846
|
+
"anchor": "gamecard-capsuleportraiturl",
|
|
4847
|
+
"group": "arcade",
|
|
4848
|
+
"signature": "readonly capsulePortraitUrl: string",
|
|
4849
|
+
"documented": true,
|
|
4850
|
+
"summary": "The portrait tile art.",
|
|
4851
|
+
"deprecated": null,
|
|
4852
|
+
"params": [],
|
|
4853
|
+
"returns": null,
|
|
4854
|
+
"throws": null,
|
|
4855
|
+
"example": null,
|
|
4856
|
+
"defaultValue": null,
|
|
4857
|
+
"guides": []
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
"id": "GameCard.previewVideoUrl",
|
|
4861
|
+
"name": "previewVideoUrl",
|
|
4862
|
+
"anchor": "gamecard-previewvideourl",
|
|
4863
|
+
"group": "arcade",
|
|
4864
|
+
"signature": "readonly previewVideoUrl?: string",
|
|
4865
|
+
"documented": true,
|
|
4866
|
+
"summary": "The tile's hover clip. Absent when the game has none, and whenever the\narcade judges a clip unwelcome: reduced motion, data saver, a phone.",
|
|
4867
|
+
"deprecated": null,
|
|
4868
|
+
"params": [],
|
|
4869
|
+
"returns": null,
|
|
4870
|
+
"throws": null,
|
|
4871
|
+
"example": null,
|
|
4872
|
+
"defaultValue": null,
|
|
4873
|
+
"guides": []
|
|
4874
|
+
},
|
|
4875
|
+
{
|
|
4876
|
+
"id": "GameCard.previewPosterUrl",
|
|
4877
|
+
"name": "previewPosterUrl",
|
|
4878
|
+
"anchor": "gamecard-previewposterurl",
|
|
4879
|
+
"group": "arcade",
|
|
4880
|
+
"signature": "readonly previewPosterUrl?: string",
|
|
4881
|
+
"documented": true,
|
|
4882
|
+
"summary": "The still shown before, and instead of, the clip.",
|
|
4883
|
+
"deprecated": null,
|
|
4884
|
+
"params": [],
|
|
4885
|
+
"returns": null,
|
|
4886
|
+
"throws": null,
|
|
4887
|
+
"example": null,
|
|
4888
|
+
"defaultValue": null,
|
|
4889
|
+
"guides": []
|
|
4890
|
+
},
|
|
4891
|
+
{
|
|
4892
|
+
"id": "SimilarGamesOutcome",
|
|
4893
|
+
"name": "SimilarGamesOutcome",
|
|
4894
|
+
"anchor": "similargamesoutcome",
|
|
4895
|
+
"group": "arcade",
|
|
4896
|
+
"signature": "interface SimilarGamesOutcome",
|
|
4897
|
+
"documented": true,
|
|
4898
|
+
"summary": "What [ArcadeApi.similarGames](api-reference-game.md#arcadeapi-similargames) resolves with.",
|
|
4899
|
+
"deprecated": null,
|
|
4900
|
+
"params": [],
|
|
4901
|
+
"returns": null,
|
|
4902
|
+
"throws": null,
|
|
4903
|
+
"example": null,
|
|
4904
|
+
"defaultValue": null,
|
|
4905
|
+
"guides": []
|
|
4906
|
+
},
|
|
4907
|
+
{
|
|
4908
|
+
"id": "SimilarGamesOutcome.games",
|
|
4909
|
+
"name": "games",
|
|
4910
|
+
"anchor": "similargamesoutcome-games",
|
|
4911
|
+
"group": "arcade",
|
|
4912
|
+
"signature": "readonly games: readonly GameCard[]",
|
|
4913
|
+
"documented": true,
|
|
4914
|
+
"summary": "Up to `limit` games, best first. Empty unless `ok` — and an `ok` may be empty too.",
|
|
4915
|
+
"deprecated": null,
|
|
4916
|
+
"params": [],
|
|
4917
|
+
"returns": null,
|
|
4918
|
+
"throws": null,
|
|
4919
|
+
"example": null,
|
|
4920
|
+
"defaultValue": null,
|
|
4921
|
+
"guides": []
|
|
4922
|
+
},
|
|
4923
|
+
{
|
|
4924
|
+
"id": "SimilarGamesOutcome.outcome",
|
|
4925
|
+
"name": "outcome",
|
|
4926
|
+
"anchor": "similargamesoutcome-outcome",
|
|
4927
|
+
"group": "arcade",
|
|
4928
|
+
"signature": "readonly outcome: ArcadeOutcomeKind",
|
|
4929
|
+
"documented": true,
|
|
4930
|
+
"summary": "What happened: `ok`, `declined` or `unavailable`. Branch on this.",
|
|
4931
|
+
"deprecated": null,
|
|
4932
|
+
"params": [],
|
|
4933
|
+
"returns": null,
|
|
4934
|
+
"throws": null,
|
|
4935
|
+
"example": null,
|
|
4936
|
+
"defaultValue": null,
|
|
4937
|
+
"guides": []
|
|
4938
|
+
},
|
|
4939
|
+
{
|
|
4940
|
+
"id": "SimilarGamesOutcome.reason",
|
|
4941
|
+
"name": "reason",
|
|
4942
|
+
"anchor": "similargamesoutcome-reason",
|
|
4943
|
+
"group": "arcade",
|
|
4944
|
+
"signature": "readonly reason?: string",
|
|
4945
|
+
"documented": true,
|
|
4946
|
+
"summary": "Why, as a machine code — `busy`, `cancelled`, `not_found`, `pending`,\n`store_off`, `sign_in_required` and more. OPEN-ENDED: the arcade may send a\ncode this SDK has never heard of, so keep a `default` arm and never show a\ncode to a player. Absent when there is nothing to add.\n\nThree are the SDK's own, answered without asking the arcade:\n`unsupported` (the arcade here does not offer this), `invalid_argument`\n(the SDK refused what you passed) and `busy` (another ask of the same kind\nis still open). `error` means no reliable answer arrived — the ask never\nleft, the wait ran out, the bridge closed or the arcade had none. For\n`gem.store.purchase` that makes the outcome UNKNOWN, not a refusal: the\nplayer may have paid.",
|
|
4947
|
+
"deprecated": null,
|
|
4948
|
+
"params": [],
|
|
4949
|
+
"returns": null,
|
|
4950
|
+
"throws": null,
|
|
4951
|
+
"example": null,
|
|
4952
|
+
"defaultValue": null,
|
|
4953
|
+
"guides": []
|
|
4954
|
+
},
|
|
4955
|
+
{
|
|
4956
|
+
"id": "ArcadeAvailability",
|
|
4957
|
+
"name": "ArcadeAvailability",
|
|
4958
|
+
"anchor": "arcadeavailability",
|
|
4959
|
+
"group": "arcade",
|
|
4960
|
+
"signature": "interface ArcadeAvailability",
|
|
4961
|
+
"documented": true,
|
|
4962
|
+
"summary": "Which arcade features answer here, read synchronously. Decide from these\nwhether to draw a \"Get the app\" button or a \"More games\" section at all.",
|
|
4963
|
+
"deprecated": null,
|
|
4964
|
+
"params": [],
|
|
4965
|
+
"returns": null,
|
|
4966
|
+
"throws": null,
|
|
4967
|
+
"example": null,
|
|
4968
|
+
"defaultValue": null,
|
|
4969
|
+
"guides": []
|
|
4970
|
+
},
|
|
4971
|
+
{
|
|
4972
|
+
"id": "ArcadeAvailability.appLinks",
|
|
4973
|
+
"name": "appLinks",
|
|
4974
|
+
"anchor": "arcadeavailability-applinks",
|
|
4975
|
+
"group": "arcade",
|
|
4976
|
+
"signature": "readonly appLinks: boolean",
|
|
4977
|
+
"documented": true,
|
|
4978
|
+
"summary": "[ArcadeApi.appLinks](api-reference-game.md#arcadeapi-applinks) and [ArcadeApi.openApp](api-reference-game.md#arcadeapi-openapp) reach the arcade.",
|
|
4979
|
+
"deprecated": null,
|
|
4980
|
+
"params": [],
|
|
4981
|
+
"returns": null,
|
|
4982
|
+
"throws": null,
|
|
4983
|
+
"example": null,
|
|
4984
|
+
"defaultValue": null,
|
|
4985
|
+
"guides": []
|
|
4986
|
+
},
|
|
4987
|
+
{
|
|
4988
|
+
"id": "ArcadeAvailability.openGame",
|
|
4989
|
+
"name": "openGame",
|
|
4990
|
+
"anchor": "arcadeavailability-opengame",
|
|
4991
|
+
"group": "arcade",
|
|
4992
|
+
"signature": "readonly openGame: boolean",
|
|
4993
|
+
"documented": true,
|
|
4994
|
+
"summary": "[ArcadeApi.openGame](api-reference-game.md#arcadeapi-opengame) and [ArcadeApi.similarGames](api-reference-game.md#arcadeapi-similargames) reach the arcade.",
|
|
4995
|
+
"deprecated": null,
|
|
4996
|
+
"params": [],
|
|
4997
|
+
"returns": null,
|
|
4998
|
+
"throws": null,
|
|
4999
|
+
"example": null,
|
|
5000
|
+
"defaultValue": null,
|
|
5001
|
+
"guides": []
|
|
5002
|
+
},
|
|
5003
|
+
{
|
|
5004
|
+
"id": "ArcadeApi",
|
|
5005
|
+
"name": "ArcadeApi",
|
|
5006
|
+
"anchor": "arcadeapi",
|
|
5007
|
+
"group": "arcade",
|
|
5008
|
+
"signature": "interface ArcadeApi",
|
|
5009
|
+
"documented": true,
|
|
5010
|
+
"summary": "The arcade-features surface. `gem.arcade` is one of these.",
|
|
5011
|
+
"deprecated": null,
|
|
5012
|
+
"params": [],
|
|
5013
|
+
"returns": null,
|
|
5014
|
+
"throws": null,
|
|
5015
|
+
"example": null,
|
|
5016
|
+
"defaultValue": null,
|
|
5017
|
+
"guides": []
|
|
5018
|
+
},
|
|
5019
|
+
{
|
|
5020
|
+
"id": "ArcadeApi.available",
|
|
5021
|
+
"name": "available",
|
|
5022
|
+
"anchor": "arcadeapi-available",
|
|
5023
|
+
"group": "arcade",
|
|
5024
|
+
"signature": "readonly available: ArcadeAvailability",
|
|
5025
|
+
"documented": true,
|
|
5026
|
+
"summary": "Which of these features the arcade answers here, synchronously. False\nbefore the bridge is up and wherever the arcade does not offer one — the\nsingle-game app, for instance, opens no other game.",
|
|
5027
|
+
"deprecated": null,
|
|
5028
|
+
"params": [],
|
|
5029
|
+
"returns": null,
|
|
5030
|
+
"throws": null,
|
|
5031
|
+
"example": null,
|
|
5032
|
+
"defaultValue": null,
|
|
5033
|
+
"guides": []
|
|
5034
|
+
},
|
|
5035
|
+
{
|
|
5036
|
+
"id": "ArcadeApi.appLinks",
|
|
5037
|
+
"name": "appLinks",
|
|
5038
|
+
"anchor": "arcadeapi-applinks",
|
|
5039
|
+
"group": "arcade",
|
|
5040
|
+
"signature": "appLinks(): Promise<AppLinksOutcome>",
|
|
5041
|
+
"documented": true,
|
|
5042
|
+
"summary": "Which app-store listings the arcade can open from here: the Gem Arcade\napp's and this game's own. A read: call it whenever, and show a button\nfor each listing present.",
|
|
5043
|
+
"deprecated": null,
|
|
5044
|
+
"params": [],
|
|
5045
|
+
"returns": "Always resolves; never rejects.",
|
|
5046
|
+
"throws": null,
|
|
5047
|
+
"example": null,
|
|
5048
|
+
"defaultValue": null,
|
|
5049
|
+
"guides": []
|
|
5050
|
+
},
|
|
5051
|
+
{
|
|
5052
|
+
"id": "ArcadeApi.openApp",
|
|
5053
|
+
"name": "openApp",
|
|
5054
|
+
"anchor": "arcadeapi-openapp",
|
|
5055
|
+
"group": "arcade",
|
|
5056
|
+
"signature": "openApp(target: \"arcade\" | \"game\"): Promise<ArcadeOutcome>",
|
|
5057
|
+
"documented": true,
|
|
5058
|
+
"summary": "Open a store listing: the Gem Arcade app's (`'arcade'`) or this game's own\n(`'game'`). **Call it from the player's press handler** — the arcade\nrefuses an ask no person pressed for, `declined` / `busy`.\n\n`ok` means it opened, in a new tab or the store app, or (`reason:\n'handed_off'`) the arcade put up its own QR sheet. The answer comes at\nthat moment, not when the player closes the sheet, so carry on either\nway; while the sheet is up, another acting call is `declined` / `busy`.",
|
|
5059
|
+
"deprecated": null,
|
|
5060
|
+
"params": [
|
|
5061
|
+
{
|
|
5062
|
+
"name": "target",
|
|
5063
|
+
"type": "\"arcade\" | \"game\"",
|
|
5064
|
+
"optional": false,
|
|
5065
|
+
"summary": null
|
|
5066
|
+
}
|
|
5067
|
+
],
|
|
5068
|
+
"returns": "Always resolves; never rejects.",
|
|
5069
|
+
"throws": null,
|
|
5070
|
+
"example": null,
|
|
5071
|
+
"defaultValue": null,
|
|
5072
|
+
"guides": []
|
|
5073
|
+
},
|
|
5074
|
+
{
|
|
5075
|
+
"id": "ArcadeApi.openGame",
|
|
5076
|
+
"name": "openGame",
|
|
5077
|
+
"anchor": "arcadeapi-opengame",
|
|
5078
|
+
"group": "arcade",
|
|
5079
|
+
"signature": "openGame(ref: string): Promise<ArcadeOutcome>",
|
|
5080
|
+
"documented": true,
|
|
5081
|
+
"summary": "Open another game in place of this one, by id or web address. **Call it\nfrom the player's press handler.**\n\n⚠️ On `ok` your game is about to be closed: `onWillTerminate` follows with\nthe ordinary save grace (250 ms). Save before you call this, not after.\n`declined` / `same_game` names this game; `unavailable` / `not_found` is a\ngame the player cannot open here.",
|
|
5082
|
+
"deprecated": null,
|
|
5083
|
+
"params": [
|
|
5084
|
+
{
|
|
5085
|
+
"name": "ref",
|
|
5086
|
+
"type": "string",
|
|
5087
|
+
"optional": false,
|
|
5088
|
+
"summary": null
|
|
5089
|
+
}
|
|
5090
|
+
],
|
|
5091
|
+
"returns": "Always resolves; never rejects.",
|
|
5092
|
+
"throws": null,
|
|
5093
|
+
"example": null,
|
|
5094
|
+
"defaultValue": null,
|
|
5095
|
+
"guides": []
|
|
5096
|
+
},
|
|
5097
|
+
{
|
|
5098
|
+
"id": "ArcadeApi.similarGames",
|
|
5099
|
+
"name": "similarGames",
|
|
5100
|
+
"anchor": "arcadeapi-similargames",
|
|
5101
|
+
"group": "arcade",
|
|
5102
|
+
"signature": "similarGames(options?: { limit?: number }): Promise<SimilarGamesOutcome>",
|
|
5103
|
+
"documented": true,
|
|
5104
|
+
"summary": "Games like this one, as Arcade home tiles: up to `limit` (1 to 24, default\n12), best first. Hide the section when `games` is empty.",
|
|
5105
|
+
"deprecated": null,
|
|
5106
|
+
"params": [
|
|
5107
|
+
{
|
|
5108
|
+
"name": "options",
|
|
5109
|
+
"type": "{ limit?: number }",
|
|
5110
|
+
"optional": true,
|
|
5111
|
+
"summary": null
|
|
5112
|
+
}
|
|
5113
|
+
],
|
|
5114
|
+
"returns": "Always resolves; never rejects.",
|
|
5115
|
+
"throws": null,
|
|
5116
|
+
"example": null,
|
|
5117
|
+
"defaultValue": null,
|
|
5118
|
+
"guides": []
|
|
5119
|
+
},
|
|
5120
|
+
{
|
|
5121
|
+
"id": "ArcadeOutcomeKind",
|
|
5122
|
+
"name": "ArcadeOutcomeKind",
|
|
5123
|
+
"anchor": "arcadeoutcomekind",
|
|
5124
|
+
"group": "arcade",
|
|
5125
|
+
"signature": "type ArcadeOutcomeKind = \"ok\" | \"declined\" | \"unavailable\"",
|
|
5126
|
+
"documented": true,
|
|
5127
|
+
"summary": "What the arcade did with an ask, the complete vocabulary: `ok`, `declined`\nor `unavailable`. Why is in `reason`, which is open-ended.",
|
|
5128
|
+
"deprecated": null,
|
|
5129
|
+
"params": [],
|
|
5130
|
+
"returns": null,
|
|
5131
|
+
"throws": null,
|
|
5132
|
+
"example": null,
|
|
5133
|
+
"defaultValue": null,
|
|
5134
|
+
"guides": []
|
|
5135
|
+
},
|
|
5136
|
+
{
|
|
5137
|
+
"id": "ArcadeOutcome",
|
|
5138
|
+
"name": "ArcadeOutcome",
|
|
5139
|
+
"anchor": "arcadeoutcome",
|
|
5140
|
+
"group": "arcade",
|
|
5141
|
+
"signature": "interface ArcadeOutcome",
|
|
5142
|
+
"documented": true,
|
|
5143
|
+
"summary": "The answer every `gem.arcade` and `gem.store` call resolves with, before\nanything specific to the call.",
|
|
5144
|
+
"deprecated": null,
|
|
5145
|
+
"params": [],
|
|
5146
|
+
"returns": null,
|
|
5147
|
+
"throws": null,
|
|
5148
|
+
"example": null,
|
|
5149
|
+
"defaultValue": null,
|
|
5150
|
+
"guides": []
|
|
5151
|
+
},
|
|
5152
|
+
{
|
|
5153
|
+
"id": "ArcadeOutcome.outcome",
|
|
5154
|
+
"name": "outcome",
|
|
5155
|
+
"anchor": "arcadeoutcome-outcome",
|
|
5156
|
+
"group": "arcade",
|
|
5157
|
+
"signature": "readonly outcome: ArcadeOutcomeKind",
|
|
5158
|
+
"documented": true,
|
|
5159
|
+
"summary": "What happened: `ok`, `declined` or `unavailable`. Branch on this.",
|
|
5160
|
+
"deprecated": null,
|
|
5161
|
+
"params": [],
|
|
5162
|
+
"returns": null,
|
|
5163
|
+
"throws": null,
|
|
5164
|
+
"example": null,
|
|
5165
|
+
"defaultValue": null,
|
|
5166
|
+
"guides": []
|
|
5167
|
+
},
|
|
5168
|
+
{
|
|
5169
|
+
"id": "ArcadeOutcome.reason",
|
|
5170
|
+
"name": "reason",
|
|
5171
|
+
"anchor": "arcadeoutcome-reason",
|
|
5172
|
+
"group": "arcade",
|
|
5173
|
+
"signature": "readonly reason?: string",
|
|
5174
|
+
"documented": true,
|
|
5175
|
+
"summary": "Why, as a machine code — `busy`, `cancelled`, `not_found`, `pending`,\n`store_off`, `sign_in_required` and more. OPEN-ENDED: the arcade may send a\ncode this SDK has never heard of, so keep a `default` arm and never show a\ncode to a player. Absent when there is nothing to add.\n\nThree are the SDK's own, answered without asking the arcade:\n`unsupported` (the arcade here does not offer this), `invalid_argument`\n(the SDK refused what you passed) and `busy` (another ask of the same kind\nis still open). `error` means no reliable answer arrived — the ask never\nleft, the wait ran out, the bridge closed or the arcade had none. For\n`gem.store.purchase` that makes the outcome UNKNOWN, not a refusal: the\nplayer may have paid.",
|
|
4171
5176
|
"deprecated": null,
|
|
4172
5177
|
"params": [],
|
|
4173
5178
|
"returns": null,
|
|
@@ -4177,13 +5182,13 @@
|
|
|
4177
5182
|
"guides": []
|
|
4178
5183
|
},
|
|
4179
5184
|
{
|
|
4180
|
-
"id": "
|
|
4181
|
-
"name": "
|
|
4182
|
-
"anchor": "
|
|
4183
|
-
"group": "
|
|
4184
|
-
"signature": "
|
|
5185
|
+
"id": "ArcadeOffer",
|
|
5186
|
+
"name": "ArcadeOffer",
|
|
5187
|
+
"anchor": "arcadeoffer",
|
|
5188
|
+
"group": "store",
|
|
5189
|
+
"signature": "interface ArcadeOffer",
|
|
4185
5190
|
"documented": true,
|
|
4186
|
-
"summary": "
|
|
5191
|
+
"summary": "One SKU the Arcade Store sells to this player, here, right now.\n\nShow `priceDisplay` **exactly as given**: it is the payment rail's own\nformatted price in the player's currency. Never parse it, compare it or\ncompute a discount from it. There is no numeric price, no balance and no\navailability flag — the arcade's sheet explains anything that stops a\npurchase.",
|
|
4187
5192
|
"deprecated": null,
|
|
4188
5193
|
"params": [],
|
|
4189
5194
|
"returns": null,
|
|
@@ -4193,13 +5198,13 @@
|
|
|
4193
5198
|
"guides": []
|
|
4194
5199
|
},
|
|
4195
5200
|
{
|
|
4196
|
-
"id": "
|
|
4197
|
-
"name": "
|
|
4198
|
-
"anchor": "
|
|
4199
|
-
"group": "
|
|
4200
|
-
"signature": "readonly
|
|
5201
|
+
"id": "ArcadeOffer.skuId",
|
|
5202
|
+
"name": "skuId",
|
|
5203
|
+
"anchor": "arcadeoffer-skuid",
|
|
5204
|
+
"group": "store",
|
|
5205
|
+
"signature": "readonly skuId: string",
|
|
4201
5206
|
"documented": true,
|
|
4202
|
-
"summary": "
|
|
5207
|
+
"summary": "The SKU's id: what [StoreApi.purchase](api-reference-game.md#storeapi-purchase) takes.",
|
|
4203
5208
|
"deprecated": null,
|
|
4204
5209
|
"params": [],
|
|
4205
5210
|
"returns": null,
|
|
@@ -4209,13 +5214,13 @@
|
|
|
4209
5214
|
"guides": []
|
|
4210
5215
|
},
|
|
4211
5216
|
{
|
|
4212
|
-
"id": "
|
|
4213
|
-
"name": "
|
|
4214
|
-
"anchor": "
|
|
4215
|
-
"group": "
|
|
4216
|
-
"signature": "
|
|
5217
|
+
"id": "ArcadeOffer.kind",
|
|
5218
|
+
"name": "kind",
|
|
5219
|
+
"anchor": "arcadeoffer-kind",
|
|
5220
|
+
"group": "store",
|
|
5221
|
+
"signature": "readonly kind: \"gem_pack\" | \"boost\" | \"pass\" | \"bundle\"",
|
|
4217
5222
|
"documented": true,
|
|
4218
|
-
"summary": "What
|
|
5223
|
+
"summary": "What sort of thing it is.",
|
|
4219
5224
|
"deprecated": null,
|
|
4220
5225
|
"params": [],
|
|
4221
5226
|
"returns": null,
|
|
@@ -4225,13 +5230,13 @@
|
|
|
4225
5230
|
"guides": []
|
|
4226
5231
|
},
|
|
4227
5232
|
{
|
|
4228
|
-
"id": "
|
|
4229
|
-
"name": "
|
|
4230
|
-
"anchor": "
|
|
4231
|
-
"group": "
|
|
4232
|
-
"signature": "readonly
|
|
5233
|
+
"id": "ArcadeOffer.name",
|
|
5234
|
+
"name": "name",
|
|
5235
|
+
"anchor": "arcadeoffer-name",
|
|
5236
|
+
"group": "store",
|
|
5237
|
+
"signature": "readonly name: string",
|
|
4233
5238
|
"documented": true,
|
|
4234
|
-
"summary": "
|
|
5239
|
+
"summary": "The store's own name for it, localized as the store shows it.",
|
|
4235
5240
|
"deprecated": null,
|
|
4236
5241
|
"params": [],
|
|
4237
5242
|
"returns": null,
|
|
@@ -4241,13 +5246,13 @@
|
|
|
4241
5246
|
"guides": []
|
|
4242
5247
|
},
|
|
4243
5248
|
{
|
|
4244
|
-
"id": "
|
|
4245
|
-
"name": "
|
|
4246
|
-
"anchor": "
|
|
4247
|
-
"group": "
|
|
4248
|
-
"signature": "readonly
|
|
5249
|
+
"id": "ArcadeOffer.description",
|
|
5250
|
+
"name": "description",
|
|
5251
|
+
"anchor": "arcadeoffer-description",
|
|
5252
|
+
"group": "store",
|
|
5253
|
+
"signature": "readonly description: string",
|
|
4249
5254
|
"documented": true,
|
|
4250
|
-
"summary": "
|
|
5255
|
+
"summary": "What the player gets, in the store's words. May be empty.",
|
|
4251
5256
|
"deprecated": null,
|
|
4252
5257
|
"params": [],
|
|
4253
5258
|
"returns": null,
|
|
@@ -4257,13 +5262,13 @@
|
|
|
4257
5262
|
"guides": []
|
|
4258
5263
|
},
|
|
4259
5264
|
{
|
|
4260
|
-
"id": "
|
|
4261
|
-
"name": "
|
|
4262
|
-
"anchor": "
|
|
4263
|
-
"group": "
|
|
4264
|
-
"signature": "
|
|
5265
|
+
"id": "ArcadeOffer.imageUrl",
|
|
5266
|
+
"name": "imageUrl",
|
|
5267
|
+
"anchor": "arcadeoffer-imageurl",
|
|
5268
|
+
"group": "store",
|
|
5269
|
+
"signature": "readonly imageUrl?: string",
|
|
4265
5270
|
"documented": true,
|
|
4266
|
-
"summary": "
|
|
5271
|
+
"summary": "The SKU's art, when it has any.",
|
|
4267
5272
|
"deprecated": null,
|
|
4268
5273
|
"params": [],
|
|
4269
5274
|
"returns": null,
|
|
@@ -4273,13 +5278,13 @@
|
|
|
4273
5278
|
"guides": []
|
|
4274
5279
|
},
|
|
4275
5280
|
{
|
|
4276
|
-
"id": "
|
|
4277
|
-
"name": "
|
|
4278
|
-
"anchor": "
|
|
4279
|
-
"group": "
|
|
4280
|
-
"signature": "readonly
|
|
5281
|
+
"id": "ArcadeOffer.priceDisplay",
|
|
5282
|
+
"name": "priceDisplay",
|
|
5283
|
+
"anchor": "arcadeoffer-pricedisplay",
|
|
5284
|
+
"group": "store",
|
|
5285
|
+
"signature": "readonly priceDisplay: string",
|
|
4281
5286
|
"documented": true,
|
|
4282
|
-
"summary": "
|
|
5287
|
+
"summary": "The price, formatted by the payment rail. Show it as given.",
|
|
4283
5288
|
"deprecated": null,
|
|
4284
5289
|
"params": [],
|
|
4285
5290
|
"returns": null,
|
|
@@ -4289,13 +5294,13 @@
|
|
|
4289
5294
|
"guides": []
|
|
4290
5295
|
},
|
|
4291
5296
|
{
|
|
4292
|
-
"id": "
|
|
4293
|
-
"name": "
|
|
4294
|
-
"anchor": "
|
|
4295
|
-
"group": "
|
|
4296
|
-
"signature": "readonly
|
|
5297
|
+
"id": "ArcadeOffer.grant",
|
|
5298
|
+
"name": "grant",
|
|
5299
|
+
"anchor": "arcadeoffer-grant",
|
|
5300
|
+
"group": "store",
|
|
5301
|
+
"signature": "readonly grant?: { currency: string; amount: number }",
|
|
4297
5302
|
"documented": true,
|
|
4298
|
-
"summary": "
|
|
5303
|
+
"summary": "For a Gem pack: the platform currency and the amount it grants.",
|
|
4299
5304
|
"deprecated": null,
|
|
4300
5305
|
"params": [],
|
|
4301
5306
|
"returns": null,
|
|
@@ -4305,13 +5310,13 @@
|
|
|
4305
5310
|
"guides": []
|
|
4306
5311
|
},
|
|
4307
5312
|
{
|
|
4308
|
-
"id": "
|
|
4309
|
-
"name": "
|
|
4310
|
-
"anchor": "
|
|
4311
|
-
"group": "
|
|
4312
|
-
"signature": "readonly
|
|
5313
|
+
"id": "ArcadeOffer.grant.currency",
|
|
5314
|
+
"name": "currency",
|
|
5315
|
+
"anchor": "arcadeoffer-grant-currency",
|
|
5316
|
+
"group": "store",
|
|
5317
|
+
"signature": "readonly currency: string",
|
|
4313
5318
|
"documented": true,
|
|
4314
|
-
"summary": "
|
|
5319
|
+
"summary": "The platform currency's exact slug, e.g. `GEMS`.",
|
|
4315
5320
|
"deprecated": null,
|
|
4316
5321
|
"params": [],
|
|
4317
5322
|
"returns": null,
|
|
@@ -4321,49 +5326,31 @@
|
|
|
4321
5326
|
"guides": []
|
|
4322
5327
|
},
|
|
4323
5328
|
{
|
|
4324
|
-
"id": "
|
|
4325
|
-
"name": "
|
|
4326
|
-
"anchor": "
|
|
4327
|
-
"group": "
|
|
4328
|
-
"signature": "
|
|
5329
|
+
"id": "ArcadeOffer.grant.amount",
|
|
5330
|
+
"name": "amount",
|
|
5331
|
+
"anchor": "arcadeoffer-grant-amount",
|
|
5332
|
+
"group": "store",
|
|
5333
|
+
"signature": "readonly amount: number",
|
|
4329
5334
|
"documented": true,
|
|
4330
|
-
"summary": "
|
|
5335
|
+
"summary": "How much of it the pack grants.",
|
|
4331
5336
|
"deprecated": null,
|
|
4332
5337
|
"params": [],
|
|
4333
5338
|
"returns": null,
|
|
4334
5339
|
"throws": null,
|
|
4335
5340
|
"example": null,
|
|
4336
5341
|
"defaultValue": null,
|
|
4337
|
-
"guides": [
|
|
4338
|
-
{
|
|
4339
|
-
"slug": "analytics",
|
|
4340
|
-
"anchor": null
|
|
4341
|
-
}
|
|
4342
|
-
]
|
|
5342
|
+
"guides": []
|
|
4343
5343
|
},
|
|
4344
5344
|
{
|
|
4345
|
-
"id": "
|
|
4346
|
-
"name": "
|
|
4347
|
-
"anchor": "
|
|
4348
|
-
"group": "
|
|
4349
|
-
"signature": "
|
|
5345
|
+
"id": "StoreOffersOutcome",
|
|
5346
|
+
"name": "StoreOffersOutcome",
|
|
5347
|
+
"anchor": "storeoffersoutcome",
|
|
5348
|
+
"group": "store",
|
|
5349
|
+
"signature": "interface StoreOffersOutcome",
|
|
4350
5350
|
"documented": true,
|
|
4351
|
-
"summary": "
|
|
5351
|
+
"summary": "What [StoreApi.offers](api-reference-game.md#storeapi-offers) resolves with.",
|
|
4352
5352
|
"deprecated": null,
|
|
4353
|
-
"params": [
|
|
4354
|
-
{
|
|
4355
|
-
"name": "name",
|
|
4356
|
-
"type": "string",
|
|
4357
|
-
"optional": false,
|
|
4358
|
-
"summary": "A declared event id — the `id` of an entry in your config's\n `analytics_events`."
|
|
4359
|
-
},
|
|
4360
|
-
{
|
|
4361
|
-
"name": "props",
|
|
4362
|
-
"type": "Readonly<Record<string, AnalyticsValue>>",
|
|
4363
|
-
"optional": false,
|
|
4364
|
-
"summary": "Dimensions (strings) and measures (numbers), merged over\n whatever [AnalyticsApi.setContext](api-reference-game.md#analyticsapi-setcontext) holds."
|
|
4365
|
-
}
|
|
4366
|
-
],
|
|
5353
|
+
"params": [],
|
|
4367
5354
|
"returns": null,
|
|
4368
5355
|
"throws": null,
|
|
4369
5356
|
"example": null,
|
|
@@ -4371,22 +5358,15 @@
|
|
|
4371
5358
|
"guides": []
|
|
4372
5359
|
},
|
|
4373
5360
|
{
|
|
4374
|
-
"id": "
|
|
4375
|
-
"name": "
|
|
4376
|
-
"anchor": "
|
|
4377
|
-
"group": "
|
|
4378
|
-
"signature": "
|
|
5361
|
+
"id": "StoreOffersOutcome.outcome",
|
|
5362
|
+
"name": "outcome",
|
|
5363
|
+
"anchor": "storeoffersoutcome-outcome",
|
|
5364
|
+
"group": "store",
|
|
5365
|
+
"signature": "readonly outcome: ArcadeOutcomeKind",
|
|
4379
5366
|
"documented": true,
|
|
4380
|
-
"summary": "
|
|
5367
|
+
"summary": "What happened: `ok`, `declined` or `unavailable`. Branch on this.",
|
|
4381
5368
|
"deprecated": null,
|
|
4382
|
-
"params": [
|
|
4383
|
-
{
|
|
4384
|
-
"name": "props",
|
|
4385
|
-
"type": "Readonly<Record<string, AnalyticsValue>>",
|
|
4386
|
-
"optional": false,
|
|
4387
|
-
"summary": null
|
|
4388
|
-
}
|
|
4389
|
-
],
|
|
5369
|
+
"params": [],
|
|
4390
5370
|
"returns": null,
|
|
4391
5371
|
"throws": null,
|
|
4392
5372
|
"example": null,
|
|
@@ -4394,42 +5374,29 @@
|
|
|
4394
5374
|
"guides": []
|
|
4395
5375
|
},
|
|
4396
5376
|
{
|
|
4397
|
-
"id": "
|
|
4398
|
-
"name": "
|
|
4399
|
-
"anchor": "
|
|
4400
|
-
"group": "
|
|
4401
|
-
"signature": "
|
|
5377
|
+
"id": "StoreOffersOutcome.reason",
|
|
5378
|
+
"name": "reason",
|
|
5379
|
+
"anchor": "storeoffersoutcome-reason",
|
|
5380
|
+
"group": "store",
|
|
5381
|
+
"signature": "readonly reason?: string",
|
|
4402
5382
|
"documented": true,
|
|
4403
|
-
"summary": "
|
|
5383
|
+
"summary": "Why, as a machine code — `busy`, `cancelled`, `not_found`, `pending`,\n`store_off`, `sign_in_required` and more. OPEN-ENDED: the arcade may send a\ncode this SDK has never heard of, so keep a `default` arm and never show a\ncode to a player. Absent when there is nothing to add.\n\nThree are the SDK's own, answered without asking the arcade:\n`unsupported` (the arcade here does not offer this), `invalid_argument`\n(the SDK refused what you passed) and `busy` (another ask of the same kind\nis still open). `error` means no reliable answer arrived — the ask never\nleft, the wait ran out, the bridge closed or the arcade had none. For\n`gem.store.purchase` that makes the outcome UNKNOWN, not a refusal: the\nplayer may have paid.",
|
|
4404
5384
|
"deprecated": null,
|
|
4405
|
-
"params": [
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
"type": "string",
|
|
4409
|
-
"optional": false,
|
|
4410
|
-
"summary": "Names the experiment — any non-empty string."
|
|
4411
|
-
},
|
|
4412
|
-
{
|
|
4413
|
-
"name": "count",
|
|
4414
|
-
"type": "number",
|
|
4415
|
-
"optional": false,
|
|
4416
|
-
"summary": "How many arms, an integer from 1 to 2048 — or, in the list\n form, `options`: the arms themselves, 1 to 2048 strings."
|
|
4417
|
-
}
|
|
4418
|
-
],
|
|
4419
|
-
"returns": "The arm's index, or the chosen string.",
|
|
4420
|
-
"throws": "TypeError for an empty key or a list holding something other than\n strings; RangeError for a count or list size outside 1 to 2048. Both\n reject before waiting for the player.",
|
|
5385
|
+
"params": [],
|
|
5386
|
+
"returns": null,
|
|
5387
|
+
"throws": null,
|
|
4421
5388
|
"example": null,
|
|
4422
5389
|
"defaultValue": null,
|
|
4423
5390
|
"guides": []
|
|
4424
5391
|
},
|
|
4425
5392
|
{
|
|
4426
|
-
"id": "
|
|
4427
|
-
"name": "
|
|
4428
|
-
"anchor": "
|
|
4429
|
-
"group": "
|
|
4430
|
-
"signature": "
|
|
5393
|
+
"id": "StoreOffersOutcome.offers",
|
|
5394
|
+
"name": "offers",
|
|
5395
|
+
"anchor": "storeoffersoutcome-offers",
|
|
5396
|
+
"group": "store",
|
|
5397
|
+
"signature": "readonly offers: readonly ArcadeOffer[]",
|
|
4431
5398
|
"documented": true,
|
|
4432
|
-
"summary": "What the
|
|
5399
|
+
"summary": "What the store sells here, in its own order. Empty unless `ok`.",
|
|
4433
5400
|
"deprecated": null,
|
|
4434
5401
|
"params": [],
|
|
4435
5402
|
"returns": null,
|
|
@@ -4439,36 +5406,29 @@
|
|
|
4439
5406
|
"guides": []
|
|
4440
5407
|
},
|
|
4441
5408
|
{
|
|
4442
|
-
"id": "
|
|
4443
|
-
"name": "
|
|
4444
|
-
"anchor": "
|
|
4445
|
-
"group": "
|
|
4446
|
-
"signature": "
|
|
5409
|
+
"id": "StoreSettlement",
|
|
5410
|
+
"name": "StoreSettlement",
|
|
5411
|
+
"anchor": "storesettlement",
|
|
5412
|
+
"group": "store",
|
|
5413
|
+
"signature": "interface StoreSettlement",
|
|
4447
5414
|
"documented": true,
|
|
4448
|
-
"summary": "
|
|
5415
|
+
"summary": "A purchase that answered `ok` / `pending` has settled.",
|
|
4449
5416
|
"deprecated": null,
|
|
4450
|
-
"params": [
|
|
4451
|
-
{
|
|
4452
|
-
"name": "options",
|
|
4453
|
-
"type": "AnalyticsFlushOptions",
|
|
4454
|
-
"optional": false,
|
|
4455
|
-
"summary": null
|
|
4456
|
-
}
|
|
4457
|
-
],
|
|
5417
|
+
"params": [],
|
|
4458
5418
|
"returns": null,
|
|
4459
|
-
"throws":
|
|
5419
|
+
"throws": null,
|
|
4460
5420
|
"example": null,
|
|
4461
5421
|
"defaultValue": null,
|
|
4462
5422
|
"guides": []
|
|
4463
5423
|
},
|
|
4464
5424
|
{
|
|
4465
|
-
"id": "
|
|
4466
|
-
"name": "
|
|
4467
|
-
"anchor": "
|
|
4468
|
-
"group": "
|
|
4469
|
-
"signature": "
|
|
5425
|
+
"id": "StoreSettlement.skuId",
|
|
5426
|
+
"name": "skuId",
|
|
5427
|
+
"anchor": "storesettlement-skuid",
|
|
5428
|
+
"group": "store",
|
|
5429
|
+
"signature": "readonly skuId: string",
|
|
4470
5430
|
"documented": true,
|
|
4471
|
-
"summary": "
|
|
5431
|
+
"summary": "The SKU it was for. Re-read balances and inventory through `gem.me`.",
|
|
4472
5432
|
"deprecated": null,
|
|
4473
5433
|
"params": [],
|
|
4474
5434
|
"returns": null,
|
|
@@ -4478,13 +5438,13 @@
|
|
|
4478
5438
|
"guides": []
|
|
4479
5439
|
},
|
|
4480
5440
|
{
|
|
4481
|
-
"id": "
|
|
4482
|
-
"name": "
|
|
4483
|
-
"anchor": "
|
|
4484
|
-
"group": "
|
|
4485
|
-
"signature": "
|
|
5441
|
+
"id": "StoreApi",
|
|
5442
|
+
"name": "StoreApi",
|
|
5443
|
+
"anchor": "storeapi",
|
|
5444
|
+
"group": "store",
|
|
5445
|
+
"signature": "interface StoreApi",
|
|
4486
5446
|
"documented": true,
|
|
4487
|
-
"summary": "
|
|
5447
|
+
"summary": "**Real money.** The Arcade Store's own Gem packs, Boosts, passes and bundles,\nbought with the player's money through the arcade's own purchase sheet.\n`gem.store` is one of these. To spend Gems or Coins on your game's own items,\nuse `gem.purchases`.",
|
|
4488
5448
|
"deprecated": null,
|
|
4489
5449
|
"params": [],
|
|
4490
5450
|
"returns": null,
|
|
@@ -4494,13 +5454,13 @@
|
|
|
4494
5454
|
"guides": []
|
|
4495
5455
|
},
|
|
4496
5456
|
{
|
|
4497
|
-
"id": "
|
|
4498
|
-
"name": "
|
|
4499
|
-
"anchor": "
|
|
4500
|
-
"group": "
|
|
4501
|
-
"signature": "
|
|
5457
|
+
"id": "StoreApi.available",
|
|
5458
|
+
"name": "available",
|
|
5459
|
+
"anchor": "storeapi-available",
|
|
5460
|
+
"group": "store",
|
|
5461
|
+
"signature": "readonly available: boolean",
|
|
4502
5462
|
"documented": true,
|
|
4503
|
-
"summary": "
|
|
5463
|
+
"summary": "Whether the Arcade Store answers here, synchronously. Draw your own \"Get\nGems\" button only when it is true.",
|
|
4504
5464
|
"deprecated": null,
|
|
4505
5465
|
"params": [],
|
|
4506
5466
|
"returns": null,
|
|
@@ -4510,52 +5470,63 @@
|
|
|
4510
5470
|
"guides": []
|
|
4511
5471
|
},
|
|
4512
5472
|
{
|
|
4513
|
-
"id": "
|
|
4514
|
-
"name": "
|
|
4515
|
-
"anchor": "
|
|
4516
|
-
"group": "
|
|
4517
|
-
"signature": "
|
|
5473
|
+
"id": "StoreApi.offers",
|
|
5474
|
+
"name": "offers",
|
|
5475
|
+
"anchor": "storeapi-offers",
|
|
5476
|
+
"group": "store",
|
|
5477
|
+
"signature": "offers(): Promise<StoreOffersOutcome>",
|
|
4518
5478
|
"documented": true,
|
|
4519
|
-
"summary": "
|
|
5479
|
+
"summary": "What the store sells this player here: names, art and the rail's own\nprices. `unavailable` / `sign_in_required` for a guest (offer\n`gem.account.requestSignIn`), `unavailable` / `store_off` where the store\nis withheld. Re-read on resume: what is on sale can change.",
|
|
4520
5480
|
"deprecated": null,
|
|
4521
5481
|
"params": [],
|
|
4522
|
-
"returns":
|
|
5482
|
+
"returns": "Always resolves; never rejects.",
|
|
4523
5483
|
"throws": null,
|
|
4524
5484
|
"example": null,
|
|
4525
5485
|
"defaultValue": null,
|
|
4526
5486
|
"guides": []
|
|
4527
5487
|
},
|
|
4528
5488
|
{
|
|
4529
|
-
"id": "
|
|
4530
|
-
"name": "
|
|
4531
|
-
"anchor": "
|
|
4532
|
-
"group": "
|
|
4533
|
-
"signature": "
|
|
5489
|
+
"id": "StoreApi.purchase",
|
|
5490
|
+
"name": "purchase",
|
|
5491
|
+
"anchor": "storeapi-purchase",
|
|
5492
|
+
"group": "store",
|
|
5493
|
+
"signature": "purchase(skuId: string): Promise<ArcadeOutcome>",
|
|
4534
5494
|
"documented": true,
|
|
4535
|
-
"summary": "
|
|
5495
|
+
"summary": "Ask the arcade to open its store's purchase sheet for one SKU from\n[StoreApi.offers](api-reference-game.md#storeapi-offers). **Call it from the player's press handler** — the\narcade refuses an ask no person pressed for, `declined` / `busy`.\n\n- `ok` — the player paid. Re-read balances and inventory through `gem.me`;\n nothing here carries an amount. With `reason: 'pending'`, the provider\n has not settled yet: [StoreApi.onSettled](api-reference-game.md#storeapi-onsettled) hears when it does.\n- `declined` — nothing was bought: `cancelled` (the player said no) or\n `busy`. Return to your screen silently, and do not ask again unprompted.\n- `unavailable` with `store_off`, `sign_in_required`, `not_found`,\n `unsupported`, `invalid_argument` or a payment provider's failure code —\n nothing was bought.\n- `unavailable` / `error` — **the outcome is unknown, and the player may\n have paid.** It is what you get when the bridge closes while the sheet\n is open, or the arcade has no reliable answer. Never tell the player\n nothing was bought: re-read balances and inventory through `gem.me`,\n and keep listening with [StoreApi.onSettled](api-reference-game.md#storeapi-onsettled).\n\nNO TIMEOUT: it waits for as long as the arcade is connected, because a\npayment takes as long as it takes.",
|
|
4536
5496
|
"deprecated": null,
|
|
4537
5497
|
"params": [
|
|
4538
5498
|
{
|
|
4539
|
-
"name": "
|
|
4540
|
-
"type": "string",
|
|
4541
|
-
"optional": false,
|
|
4542
|
-
"summary": "Names the experiment — any non-empty string, and the only thing\n that makes one experiment's split independent of another's."
|
|
4543
|
-
},
|
|
4544
|
-
{
|
|
4545
|
-
"name": "playerId",
|
|
5499
|
+
"name": "skuId",
|
|
4546
5500
|
"type": "string",
|
|
4547
5501
|
"optional": false,
|
|
4548
|
-
"summary":
|
|
4549
|
-
}
|
|
5502
|
+
"summary": null
|
|
5503
|
+
}
|
|
5504
|
+
],
|
|
5505
|
+
"returns": "Always resolves; never rejects.",
|
|
5506
|
+
"throws": null,
|
|
5507
|
+
"example": null,
|
|
5508
|
+
"defaultValue": null,
|
|
5509
|
+
"guides": []
|
|
5510
|
+
},
|
|
5511
|
+
{
|
|
5512
|
+
"id": "StoreApi.onSettled",
|
|
5513
|
+
"name": "onSettled",
|
|
5514
|
+
"anchor": "storeapi-onsettled",
|
|
5515
|
+
"group": "store",
|
|
5516
|
+
"signature": "onSettled(listener: (settlement: StoreSettlement) => void): () => void",
|
|
5517
|
+
"documented": true,
|
|
5518
|
+
"summary": "Hear when a purchase that answered `ok` / `pending` settles, while your\ngame is running. Returns a function that stops listening.",
|
|
5519
|
+
"deprecated": null,
|
|
5520
|
+
"params": [
|
|
4550
5521
|
{
|
|
4551
|
-
"name": "
|
|
4552
|
-
"type": "
|
|
5522
|
+
"name": "listener",
|
|
5523
|
+
"type": "(settlement: StoreSettlement) => void",
|
|
4553
5524
|
"optional": false,
|
|
4554
|
-
"summary":
|
|
5525
|
+
"summary": null
|
|
4555
5526
|
}
|
|
4556
5527
|
],
|
|
4557
5528
|
"returns": null,
|
|
4558
|
-
"throws":
|
|
5529
|
+
"throws": null,
|
|
4559
5530
|
"example": null,
|
|
4560
5531
|
"defaultValue": null,
|
|
4561
5532
|
"guides": []
|
|
@@ -11023,7 +11994,7 @@
|
|
|
11023
11994
|
"group": "start",
|
|
11024
11995
|
"signature": "readonly purchases: PurchaseApi",
|
|
11025
11996
|
"documented": true,
|
|
11026
|
-
"summary": "Buy one of YOUR OWN items or recipes
|
|
11997
|
+
"summary": "**Gems and Coins, not real money.** Buy one of YOUR OWN items or recipes\nwith platform currency, on the player's behalf. To sell the Arcade Store's\nown Gem packs, Boosts and passes for the player's money, use\n[Gem.store](api-reference-game.md#gem-store).\n\nThis is the platform-owned path: the request crosses the bridge, the parent\nalways renders the platform purchase sheet in trusted chrome, and the\nparent's account session submits the confirmed purchase.\n\nFor a game-owned purchase UI, call `gem.me.mutations.purchase()` with\n`payment: { kind: 'platform_currency', currencySlug: 'GEMS' }`. That direct\nSDK path does not cross the bridge or invoke the platform sheet.\n\nThe catalog is yours to read directly; only the money crosses the bridge.\nBuild your shop from `gameConfig`, then call this when the player taps Buy.\n\nResolves for every outcome — a decline is what a shop does, not an\nexception. On `ok`, re-read inventory rather than assuming what landed.",
|
|
11027
11998
|
"deprecated": null,
|
|
11028
11999
|
"params": [],
|
|
11029
12000
|
"returns": null,
|
|
@@ -11132,6 +12103,48 @@
|
|
|
11132
12103
|
}
|
|
11133
12104
|
]
|
|
11134
12105
|
},
|
|
12106
|
+
{
|
|
12107
|
+
"id": "Gem.arcade",
|
|
12108
|
+
"name": "arcade",
|
|
12109
|
+
"anchor": "gem-arcade",
|
|
12110
|
+
"group": "start",
|
|
12111
|
+
"signature": "readonly arcade: ArcadeApi",
|
|
12112
|
+
"documented": true,
|
|
12113
|
+
"summary": "The Gem Arcade's own features, asked for from your game: link out to the\nGem Arcade app or your game's own app, open another game, and list games\nlike yours as home tiles.\n\nThe game asks; the arcade decides. Nothing you send is a URL, and nothing\nrejects: every call resolves `{ outcome, reason, … }`. Check\n[ArcadeApi.available](api-reference-game.md#arcadeapi-available) before drawing a button, and call `openApp`\nand `openGame` from the player's press handler.",
|
|
12114
|
+
"deprecated": null,
|
|
12115
|
+
"params": [],
|
|
12116
|
+
"returns": null,
|
|
12117
|
+
"throws": null,
|
|
12118
|
+
"example": null,
|
|
12119
|
+
"defaultValue": null,
|
|
12120
|
+
"guides": [
|
|
12121
|
+
{
|
|
12122
|
+
"slug": "arcade-and-store",
|
|
12123
|
+
"anchor": null
|
|
12124
|
+
}
|
|
12125
|
+
]
|
|
12126
|
+
},
|
|
12127
|
+
{
|
|
12128
|
+
"id": "Gem.store",
|
|
12129
|
+
"name": "store",
|
|
12130
|
+
"anchor": "gem-store",
|
|
12131
|
+
"group": "start",
|
|
12132
|
+
"signature": "readonly store: StoreApi",
|
|
12133
|
+
"documented": true,
|
|
12134
|
+
"summary": "**Real money.** The Arcade Store's own Gem packs, Boosts, passes and\nbundles, sold for the player's money through the arcade's own purchase\nsheet. To spend Gems or Coins on your game's own items, use\n[Gem.purchases](api-reference-game.md#gem-purchases).\n\nList what the store sells here with `offers()`, show each `priceDisplay`\nexactly as given, and call `purchase(skuId)` from the player's press. After\n`ok`, re-read balances through [Gem.me](api-reference-game.md#gem-me). Nothing rejects.",
|
|
12135
|
+
"deprecated": null,
|
|
12136
|
+
"params": [],
|
|
12137
|
+
"returns": null,
|
|
12138
|
+
"throws": null,
|
|
12139
|
+
"example": null,
|
|
12140
|
+
"defaultValue": null,
|
|
12141
|
+
"guides": [
|
|
12142
|
+
{
|
|
12143
|
+
"slug": "arcade-and-store",
|
|
12144
|
+
"anchor": null
|
|
12145
|
+
}
|
|
12146
|
+
]
|
|
12147
|
+
},
|
|
11135
12148
|
{
|
|
11136
12149
|
"id": "Gem.avatarPickerAvailable",
|
|
11137
12150
|
"name": "avatarPickerAvailable",
|