@capgo/capacitor-admob 7.1.1 → 7.4.4

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/dist/docs.json CHANGED
@@ -2,16 +2,38 @@
2
2
  "api": {
3
3
  "name": "AdMobPlusPlugin",
4
4
  "slug": "admobplusplugin",
5
- "docs": "",
6
- "tags": [],
5
+ "docs": "AdMob Plus Plugin interface for displaying Google AdMob ads in Capacitor apps.",
6
+ "tags": [
7
+ {
8
+ "text": "1.0.0",
9
+ "name": "since"
10
+ }
11
+ ],
7
12
  "methods": [
8
13
  {
9
14
  "name": "start",
10
15
  "signature": "() => Promise<void>",
11
16
  "parameters": [],
12
17
  "returns": "Promise<void>",
13
- "tags": [],
14
- "docs": "",
18
+ "tags": [
19
+ {
20
+ "name": "returns",
21
+ "text": "Promise that resolves when the SDK is initialized"
22
+ },
23
+ {
24
+ "name": "throws",
25
+ "text": "Error if initialization fails"
26
+ },
27
+ {
28
+ "name": "since",
29
+ "text": "1.0.0"
30
+ },
31
+ {
32
+ "name": "example",
33
+ "text": "```typescript\nawait AdMob.start();\n```"
34
+ }
35
+ ],
36
+ "docs": "Initialize and start the AdMob SDK.",
15
37
  "complexTypes": [],
16
38
  "slug": "start"
17
39
  },
@@ -21,13 +43,34 @@
21
43
  "parameters": [
22
44
  {
23
45
  "name": "config",
24
- "docs": "",
46
+ "docs": "- Configuration options for AdMob",
25
47
  "type": "AdMobConfig"
26
48
  }
27
49
  ],
28
50
  "returns": "Promise<void>",
29
- "tags": [],
30
- "docs": "",
51
+ "tags": [
52
+ {
53
+ "name": "param",
54
+ "text": "config - Configuration options for AdMob"
55
+ },
56
+ {
57
+ "name": "returns",
58
+ "text": "Promise that resolves when configuration is applied"
59
+ },
60
+ {
61
+ "name": "throws",
62
+ "text": "Error if configuration fails"
63
+ },
64
+ {
65
+ "name": "since",
66
+ "text": "1.0.0"
67
+ },
68
+ {
69
+ "name": "example",
70
+ "text": "```typescript\nawait AdMob.configure({\n appMuted: false,\n appVolume: 0.5\n});\n```"
71
+ }
72
+ ],
73
+ "docs": "Configure AdMob settings.",
31
74
  "complexTypes": [
32
75
  "AdMobConfig"
33
76
  ],
@@ -39,13 +82,34 @@
39
82
  "parameters": [
40
83
  {
41
84
  "name": "requestConfig",
42
- "docs": "",
85
+ "docs": "- Request configuration options",
43
86
  "type": "RequestConfig"
44
87
  }
45
88
  ],
46
89
  "returns": "Promise<void>",
47
- "tags": [],
48
- "docs": "",
90
+ "tags": [
91
+ {
92
+ "name": "param",
93
+ "text": "requestConfig - Request configuration options"
94
+ },
95
+ {
96
+ "name": "returns",
97
+ "text": "Promise that resolves when request configuration is applied"
98
+ },
99
+ {
100
+ "name": "throws",
101
+ "text": "Error if configuration fails"
102
+ },
103
+ {
104
+ "name": "since",
105
+ "text": "1.0.0"
106
+ },
107
+ {
108
+ "name": "example",
109
+ "text": "```typescript\nawait AdMob.configRequest({\n maxAdContentRating: MaxAdContentRating.PG,\n tagForChildDirectedTreatment: true,\n testDeviceIds: ['test-device-id']\n});\n```"
110
+ }
111
+ ],
112
+ "docs": "Configure ad request settings.",
49
113
  "complexTypes": [
50
114
  "RequestConfig"
51
115
  ],
@@ -57,13 +121,34 @@
57
121
  "parameters": [
58
122
  {
59
123
  "name": "opts",
60
- "docs": "",
124
+ "docs": "- Options for creating the ad, including ad unit ID",
61
125
  "type": "O"
62
126
  }
63
127
  ],
64
128
  "returns": "Promise<void>",
65
- "tags": [],
66
- "docs": "",
129
+ "tags": [
130
+ {
131
+ "name": "param",
132
+ "text": "opts - Options for creating the ad, including ad unit ID"
133
+ },
134
+ {
135
+ "name": "returns",
136
+ "text": "Promise that resolves when the ad is created"
137
+ },
138
+ {
139
+ "name": "throws",
140
+ "text": "Error if ad creation fails"
141
+ },
142
+ {
143
+ "name": "since",
144
+ "text": "1.0.0"
145
+ },
146
+ {
147
+ "name": "example",
148
+ "text": "```typescript\nawait AdMob.adCreate({\n adUnitId: 'ca-app-pub-3940256099942544/1033173712'\n});\n```"
149
+ }
150
+ ],
151
+ "docs": "Create a new ad instance.",
67
152
  "complexTypes": [
68
153
  "MobileAdOptions",
69
154
  "O"
@@ -76,13 +161,34 @@
76
161
  "parameters": [
77
162
  {
78
163
  "name": "opts",
79
- "docs": "",
164
+ "docs": "- Object containing the ad ID",
80
165
  "type": "{ id: number; }"
81
166
  }
82
167
  ],
83
168
  "returns": "Promise<boolean>",
84
- "tags": [],
85
- "docs": "",
169
+ "tags": [
170
+ {
171
+ "name": "param",
172
+ "text": "opts - Object containing the ad ID"
173
+ },
174
+ {
175
+ "name": "returns",
176
+ "text": "Promise that resolves to true if the ad is loaded, false otherwise"
177
+ },
178
+ {
179
+ "name": "throws",
180
+ "text": "Error if checking load status fails"
181
+ },
182
+ {
183
+ "name": "since",
184
+ "text": "1.0.0"
185
+ },
186
+ {
187
+ "name": "example",
188
+ "text": "```typescript\nconst isLoaded = await AdMob.adIsLoaded({ id: 1 });\nif (isLoaded) {\n await AdMob.adShow({ id: 1 });\n}\n```"
189
+ }
190
+ ],
191
+ "docs": "Check if an ad is loaded and ready to be shown.",
86
192
  "complexTypes": [],
87
193
  "slug": "adisloaded"
88
194
  },
@@ -92,13 +198,34 @@
92
198
  "parameters": [
93
199
  {
94
200
  "name": "opts",
95
- "docs": "",
201
+ "docs": "- Object containing the ad ID",
96
202
  "type": "{ id: number; }"
97
203
  }
98
204
  ],
99
205
  "returns": "Promise<void>",
100
- "tags": [],
101
- "docs": "",
206
+ "tags": [
207
+ {
208
+ "name": "param",
209
+ "text": "opts - Object containing the ad ID"
210
+ },
211
+ {
212
+ "name": "returns",
213
+ "text": "Promise that resolves when the ad is loaded"
214
+ },
215
+ {
216
+ "name": "throws",
217
+ "text": "Error if ad loading fails"
218
+ },
219
+ {
220
+ "name": "since",
221
+ "text": "1.0.0"
222
+ },
223
+ {
224
+ "name": "example",
225
+ "text": "```typescript\nawait AdMob.adLoad({ id: 1 });\n```"
226
+ }
227
+ ],
228
+ "docs": "Load an ad.",
102
229
  "complexTypes": [],
103
230
  "slug": "adload"
104
231
  },
@@ -108,13 +235,34 @@
108
235
  "parameters": [
109
236
  {
110
237
  "name": "opts",
111
- "docs": "",
238
+ "docs": "- Object containing the ad ID",
112
239
  "type": "{ id: number; }"
113
240
  }
114
241
  ],
115
242
  "returns": "Promise<void>",
116
- "tags": [],
117
- "docs": "",
243
+ "tags": [
244
+ {
245
+ "name": "param",
246
+ "text": "opts - Object containing the ad ID"
247
+ },
248
+ {
249
+ "name": "returns",
250
+ "text": "Promise that resolves when the ad is shown"
251
+ },
252
+ {
253
+ "name": "throws",
254
+ "text": "Error if showing the ad fails or if the ad is not loaded"
255
+ },
256
+ {
257
+ "name": "since",
258
+ "text": "1.0.0"
259
+ },
260
+ {
261
+ "name": "example",
262
+ "text": "```typescript\nawait AdMob.adShow({ id: 1 });\n```"
263
+ }
264
+ ],
265
+ "docs": "Show a loaded ad.",
118
266
  "complexTypes": [],
119
267
  "slug": "adshow"
120
268
  },
@@ -124,13 +272,34 @@
124
272
  "parameters": [
125
273
  {
126
274
  "name": "opts",
127
- "docs": "",
275
+ "docs": "- Object containing the ad ID",
128
276
  "type": "{ id: number; }"
129
277
  }
130
278
  ],
131
279
  "returns": "Promise<void>",
132
- "tags": [],
133
- "docs": "",
280
+ "tags": [
281
+ {
282
+ "name": "param",
283
+ "text": "opts - Object containing the ad ID"
284
+ },
285
+ {
286
+ "name": "returns",
287
+ "text": "Promise that resolves when the ad is hidden"
288
+ },
289
+ {
290
+ "name": "throws",
291
+ "text": "Error if hiding the ad fails"
292
+ },
293
+ {
294
+ "name": "since",
295
+ "text": "1.0.0"
296
+ },
297
+ {
298
+ "name": "example",
299
+ "text": "```typescript\nawait AdMob.adHide({ id: 1 });\n```"
300
+ }
301
+ ],
302
+ "docs": "Hide a currently displayed ad.",
134
303
  "complexTypes": [],
135
304
  "slug": "adhide"
136
305
  },
@@ -139,8 +308,25 @@
139
308
  "signature": "() => Promise<{ status: TrackingAuthorizationStatus | false; }>",
140
309
  "parameters": [],
141
310
  "returns": "Promise<{ status: false | TrackingAuthorizationStatus; }>",
142
- "tags": [],
143
- "docs": "",
311
+ "tags": [
312
+ {
313
+ "name": "returns",
314
+ "text": "Promise that resolves with the current tracking authorization status"
315
+ },
316
+ {
317
+ "name": "throws",
318
+ "text": "Error if getting status fails"
319
+ },
320
+ {
321
+ "name": "since",
322
+ "text": "1.0.0"
323
+ },
324
+ {
325
+ "name": "example",
326
+ "text": "```typescript\nconst { status } = await AdMob.trackingAuthorizationStatus();\nif (status === TrackingAuthorizationStatus.notDetermined) {\n await AdMob.requestTrackingAuthorization();\n}\n```"
327
+ }
328
+ ],
329
+ "docs": "Get the current tracking authorization status (iOS only).",
144
330
  "complexTypes": [
145
331
  "TrackingAuthorizationStatus"
146
332
  ],
@@ -151,8 +337,25 @@
151
337
  "signature": "() => Promise<{ status: TrackingAuthorizationStatus | false; }>",
152
338
  "parameters": [],
153
339
  "returns": "Promise<{ status: false | TrackingAuthorizationStatus; }>",
154
- "tags": [],
155
- "docs": "",
340
+ "tags": [
341
+ {
342
+ "name": "returns",
343
+ "text": "Promise that resolves with the tracking authorization status after the request"
344
+ },
345
+ {
346
+ "name": "throws",
347
+ "text": "Error if the request fails"
348
+ },
349
+ {
350
+ "name": "since",
351
+ "text": "1.0.0"
352
+ },
353
+ {
354
+ "name": "example",
355
+ "text": "```typescript\nconst { status } = await AdMob.requestTrackingAuthorization();\nconsole.log('User tracking status:', status);\n```"
356
+ }
357
+ ],
358
+ "docs": "Request tracking authorization from the user (iOS only).",
156
359
  "complexTypes": [
157
360
  "TrackingAuthorizationStatus"
158
361
  ],
@@ -164,18 +367,39 @@
164
367
  "parameters": [
165
368
  {
166
369
  "name": "eventName",
167
- "docs": "",
370
+ "docs": "- The name of the event to listen for",
168
371
  "type": "string"
169
372
  },
170
373
  {
171
374
  "name": "listenerFunc",
172
- "docs": "",
375
+ "docs": "- The function to call when the event occurs",
173
376
  "type": "(event: any) => void"
174
377
  }
175
378
  ],
176
379
  "returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
177
- "tags": [],
178
- "docs": "",
380
+ "tags": [
381
+ {
382
+ "name": "param",
383
+ "text": "eventName - The name of the event to listen for"
384
+ },
385
+ {
386
+ "name": "param",
387
+ "text": "listenerFunc - The function to call when the event occurs"
388
+ },
389
+ {
390
+ "name": "returns",
391
+ "text": "A promise that resolves to a listener handle"
392
+ },
393
+ {
394
+ "name": "since",
395
+ "text": "1.0.0"
396
+ },
397
+ {
398
+ "name": "example",
399
+ "text": "```typescript\nconst listener = await AdMob.addListener('adLoaded', (event) => {\n console.log('Ad loaded:', event);\n});\n\n// Remove listener when done\nawait listener.remove();\n```"
400
+ }
401
+ ],
402
+ "docs": "Add a listener for ad events.",
179
403
  "complexTypes": [
180
404
  "PluginListenerHandle"
181
405
  ],
@@ -189,14 +413,22 @@
189
413
  "tags": [
190
414
  {
191
415
  "name": "returns",
192
- "text": "an Promise with version for this device"
416
+ "text": "Promise that resolves with the plugin version"
193
417
  },
194
418
  {
195
419
  "name": "throws",
196
- "text": "An error if the something went wrong"
420
+ "text": "Error if getting the version fails"
421
+ },
422
+ {
423
+ "name": "since",
424
+ "text": "1.0.0"
425
+ },
426
+ {
427
+ "name": "example",
428
+ "text": "```typescript\nconst { version } = await AdMob.getPluginVersion();\nconsole.log('Plugin version:', version);\n```"
197
429
  }
198
430
  ],
199
- "docs": "Get the native Capacitor plugin version",
431
+ "docs": "Get the native Capacitor plugin version.",
200
432
  "complexTypes": [],
201
433
  "slug": "getpluginversion"
202
434
  }
@@ -230,31 +462,31 @@
230
462
  "name": "G",
231
463
  "value": "'G'",
232
464
  "tags": [],
233
- "docs": ""
465
+ "docs": "General Audiences"
234
466
  },
235
467
  {
236
468
  "name": "MA",
237
469
  "value": "'MA'",
238
470
  "tags": [],
239
- "docs": ""
471
+ "docs": "Mature Audiences"
240
472
  },
241
473
  {
242
474
  "name": "PG",
243
475
  "value": "'PG'",
244
476
  "tags": [],
245
- "docs": ""
477
+ "docs": "Parental Guidance"
246
478
  },
247
479
  {
248
480
  "name": "T",
249
481
  "value": "'T'",
250
482
  "tags": [],
251
- "docs": ""
483
+ "docs": "Teen"
252
484
  },
253
485
  {
254
486
  "name": "UNSPECIFIED",
255
487
  "value": "''",
256
488
  "tags": [],
257
- "docs": ""
489
+ "docs": "Unspecified rating"
258
490
  }
259
491
  ]
260
492
  },
@@ -266,25 +498,25 @@
266
498
  "name": "notDetermined",
267
499
  "value": "0",
268
500
  "tags": [],
269
- "docs": ""
501
+ "docs": "User has not yet received an authorization request"
270
502
  },
271
503
  {
272
504
  "name": "restricted",
273
505
  "value": "1",
274
506
  "tags": [],
275
- "docs": ""
507
+ "docs": "User restricted, device is unable to provide authorization"
276
508
  },
277
509
  {
278
510
  "name": "denied",
279
511
  "value": "2",
280
512
  "tags": [],
281
- "docs": ""
513
+ "docs": "User denied authorization"
282
514
  },
283
515
  {
284
516
  "name": "authorized",
285
517
  "value": "3",
286
518
  "tags": [],
287
- "docs": ""
519
+ "docs": "User authorized access"
288
520
  }
289
521
  ]
290
522
  }
@@ -293,10 +525,10 @@
293
525
  {
294
526
  "name": "AdMobConfig",
295
527
  "slug": "admobconfig",
296
- "docs": "",
528
+ "docs": "Configuration options for AdMob.",
297
529
  "types": [
298
530
  {
299
- "text": "{\n appMuted?: boolean;\n appVolume?: number;\n}",
531
+ "text": "{\n /** Whether the app should be muted */\n appMuted?: boolean;\n /** The app volume (0.0 to 1.0) */\n appVolume?: number;\n}",
300
532
  "complexTypes": []
301
533
  }
302
534
  ]
@@ -304,10 +536,10 @@
304
536
  {
305
537
  "name": "RequestConfig",
306
538
  "slug": "requestconfig",
307
- "docs": "",
539
+ "docs": "Configuration for ad requests.",
308
540
  "types": [
309
541
  {
310
- "text": "{\n maxAdContentRating?: MaxAdContentRating;\n sameAppKey?: boolean;\n tagForChildDirectedTreatment?: boolean | null;\n tagForUnderAgeOfConsent?: boolean | null;\n testDeviceIds?: string[];\n}",
542
+ "text": "{\n /** Maximum ad content rating */\n maxAdContentRating?: MaxAdContentRating;\n /** Whether to use the same app key */\n sameAppKey?: boolean;\n /** Tag for child-directed treatment (true, false, or null for unspecified) */\n tagForChildDirectedTreatment?: boolean | null;\n /** Tag for under age of consent (true, false, or null for unspecified) */\n tagForUnderAgeOfConsent?: boolean | null;\n /** Array of test device IDs */\n testDeviceIds?: string[];\n}",
311
543
  "complexTypes": [
312
544
  "MaxAdContentRating"
313
545
  ]
@@ -317,10 +549,10 @@
317
549
  {
318
550
  "name": "MobileAdOptions",
319
551
  "slug": "mobileadoptions",
320
- "docs": "",
552
+ "docs": "Base options for mobile ads.",
321
553
  "types": [
322
554
  {
323
- "text": "{ adUnitId: string }",
555
+ "text": "{\n /** The ad unit ID from AdMob */\n adUnitId: string;\n}",
324
556
  "complexTypes": []
325
557
  }
326
558
  ]