@smartico/public-api 0.0.379 → 0.0.380
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/.nvmrc +1 -1
- package/README.md +31 -2
- package/dist/Store/BuyStoreItemErrorCode.d.ts +9 -1
- package/dist/Tournaments/TournamentRegistrationError.d.ts +3 -1
- package/dist/WSAPI/WSAPI.d.ts +13 -1235
- package/dist/WSAPI/WSAPIAvatars.d.ts +78 -0
- package/dist/WSAPI/WSAPIBase.d.ts +71 -0
- package/dist/WSAPI/WSAPIBonuses.d.ts +26 -0
- package/dist/WSAPI/WSAPIClans.d.ts +388 -0
- package/dist/WSAPI/WSAPIGamePick.d.ts +308 -0
- package/dist/WSAPI/WSAPIGeneral.d.ts +30 -0
- package/dist/WSAPI/WSAPIInbox.d.ts +126 -0
- package/dist/WSAPI/WSAPIJackpots.d.ts +109 -0
- package/dist/WSAPI/WSAPILeaderBoard.d.ts +25 -0
- package/dist/WSAPI/WSAPIMiniGames.d.ts +94 -0
- package/dist/WSAPI/WSAPIMissions.d.ts +517 -0
- package/dist/WSAPI/WSAPIRaffles.d.ts +119 -0
- package/dist/WSAPI/WSAPIStore.d.ts +656 -0
- package/dist/WSAPI/WSAPITournaments.d.ts +501 -0
- package/dist/WSAPI/WSAPITypes.d.ts +145 -85
- package/dist/WSAPI/WSAPIUser.d.ts +383 -0
- package/dist/index.js +3818 -1528
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +3180 -981
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +56 -2
- package/docs/api/classes/WSAPIAvatars.md +116 -0
- package/docs/api/classes/WSAPIBonuses.md +50 -0
- package/docs/api/classes/WSAPIClans.md +66 -0
- package/docs/api/classes/WSAPIGamePick.md +181 -0
- package/docs/api/classes/WSAPIGeneral.md +63 -0
- package/docs/api/classes/WSAPIInbox.md +277 -0
- package/docs/api/classes/WSAPIJackpots.md +185 -0
- package/docs/api/classes/WSAPILeaderBoard.md +39 -0
- package/docs/api/classes/WSAPIMiniGames.md +175 -0
- package/docs/api/classes/WSAPIMissions.md +611 -0
- package/docs/api/classes/WSAPIRaffles.md +195 -0
- package/docs/api/classes/WSAPIStore.md +744 -0
- package/docs/api/classes/WSAPITournaments.md +104 -0
- package/docs/api/classes/WSAPIUser.md +200 -0
- package/docs/api/enumerations/AchievementClaimPeriodTypeId.md +13 -0
- package/docs/api/enumerations/BuyStoreItemErrorCode.md +32 -0
- package/docs/api/interfaces/ClanPrizePublicMeta.md +41 -0
- package/docs/api/interfaces/ClanPrizeStructureEntry.md +7 -1
- package/docs/api/interfaces/ClanPublicMeta.md +4 -0
- package/docs/api/interfaces/SAWTemplateUI.md +10 -0
- package/docs/api/interfaces/TAchCategory.md +19 -4
- package/docs/api/interfaces/TBuyStoreItemResult.md +26 -8
- package/docs/api/interfaces/TMissionClaimRewardResult.md +14 -3
- package/docs/api/interfaces/TMissionOptInResult.md +10 -3
- package/docs/api/interfaces/TMissionOrBadge.md +6 -2
- package/docs/api/interfaces/TStoreItem.md +21 -1
- package/docs/api/interfaces/TTournamentDetailed.md +8 -0
- package/docs/api/interfaces/UserAchievement.md +1 -1
- package/docs/ui/clans/UIGuide_getClanInfo.md +153 -0
- package/docs/ui/clans/UIGuide_getClans.md +172 -0
- package/docs/ui/clans/UIGuide_joinClan.md +196 -0
- package/docs/ui/missions/UIGuide_getAchCategories.md +17 -0
- package/docs/ui/missions/UIGuide_getBadges.md +237 -0
- package/docs/ui/missions/UIGuide_getMissions.md +268 -0
- package/docs/ui/missions/UIGuide_requestMissionClaimReward.md +21 -0
- package/docs/ui/missions/UIGuide_requestMissionOptIn.md +16 -0
- package/docs/ui/store/UIGuide_buyStoreItem.md +133 -0
- package/docs/ui/store/UIGuide_getStoreCategories.md +19 -0
- package/docs/ui/store/UIGuide_getStoreItems.md +264 -0
- package/docs/ui/store/UIGuide_getStorePurchasedItems.md +122 -0
- package/docs/ui/tournaments/UIGuide_getClanTournamentPlayers.md +140 -0
- package/docs/ui/tournaments/UIGuide_getTournamentInstanceInfo.md +265 -0
- package/docs/ui/tournaments/UIGuide_getTournamentsList.md +236 -0
- package/docs/ui/tournaments/UIGuide_registerInTournament.md +156 -0
- package/docs/ui/user/UIGuide_getLevels.md +162 -0
- package/docs/ui/user/UIGuide_getUserProfile.md +213 -0
- package/package.json +3 -3
- package/scripts/postdoc-cleanup.js +195 -0
- package/src/Missions/MissionsUtils.ts +5 -2
- package/src/Store/BuyStoreItemErrorCode.ts +8 -0
- package/src/Store/StoreItem.ts +1 -0
- package/src/Store/StoreItemPurchased.ts +1 -0
- package/src/Store/StoreItemType.ts +1 -1
- package/src/Tournaments/TournamentRegistrationError.ts +4 -0
- package/src/WSAPI/WSAPI.ts +27 -2007
- package/src/WSAPI/WSAPIAvatars.ts +127 -0
- package/src/WSAPI/WSAPIBase.ts +93 -0
- package/src/WSAPI/WSAPIBonuses.ts +54 -0
- package/src/WSAPI/WSAPIClans.ts +417 -0
- package/src/WSAPI/WSAPIGamePick.ts +382 -0
- package/src/WSAPI/WSAPIGeneral.ts +57 -0
- package/src/WSAPI/WSAPIInbox.ts +222 -0
- package/src/WSAPI/WSAPIJackpots.ts +212 -0
- package/src/WSAPI/WSAPILeaderBoard.ts +40 -0
- package/src/WSAPI/WSAPIMiniGames.ts +181 -0
- package/src/WSAPI/WSAPIMissions.ts +572 -0
- package/src/WSAPI/WSAPIRaffles.ts +175 -0
- package/src/WSAPI/WSAPIStore.ts +732 -0
- package/src/WSAPI/WSAPITournaments.ts +541 -0
- package/src/WSAPI/WSAPITypes.ts +145 -87
- package/src/WSAPI/WSAPIUser.ts +456 -0
- package/tsconfig.json +17 -1
- package/docs/api/classes/WSAPI.md +0 -1927
|
@@ -1,1927 +0,0 @@
|
|
|
1
|
-
# Class: WSAPI
|
|
2
|
-
|
|
3
|
-
## Methods
|
|
4
|
-
|
|
5
|
-
### getUserProfile()
|
|
6
|
-
|
|
7
|
-
> **getUserProfile**(): [`TUserProfile`](../interfaces/TUserProfile.md)
|
|
8
|
-
|
|
9
|
-
Returns information about current user
|
|
10
|
-
Pay attention that this method is synchronous and returns the user profile object immediately, not a promise.
|
|
11
|
-
**Example**:
|
|
12
|
-
```
|
|
13
|
-
var p = _smartico.api.getUserProfile();
|
|
14
|
-
console.log(p);
|
|
15
|
-
```
|
|
16
|
-
**Visitor mode: not supported**
|
|
17
|
-
|
|
18
|
-
#### Returns
|
|
19
|
-
|
|
20
|
-
[`TUserProfile`](../interfaces/TUserProfile.md)
|
|
21
|
-
|
|
22
|
-
***
|
|
23
|
-
|
|
24
|
-
### checkSegmentMatch()
|
|
25
|
-
|
|
26
|
-
> **checkSegmentMatch**(`segment_id`): `Promise`\<`boolean`\>
|
|
27
|
-
|
|
28
|
-
Check if user belongs to specific segments
|
|
29
|
-
**Example**:
|
|
30
|
-
```
|
|
31
|
-
_smartico.api.checkSegmentMatch(1).then((result) => {
|
|
32
|
-
console.log(result);
|
|
33
|
-
});
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**Visitor mode: not supported**
|
|
37
|
-
|
|
38
|
-
#### Parameters
|
|
39
|
-
|
|
40
|
-
##### segment\_id
|
|
41
|
-
|
|
42
|
-
`number`
|
|
43
|
-
|
|
44
|
-
#### Returns
|
|
45
|
-
|
|
46
|
-
`Promise`\<`boolean`\>
|
|
47
|
-
|
|
48
|
-
***
|
|
49
|
-
|
|
50
|
-
### checkSegmentListMatch()
|
|
51
|
-
|
|
52
|
-
> **checkSegmentListMatch**(`segment_ids`): `Promise`\<[`TSegmentCheckResult`](../interfaces/TSegmentCheckResult.md)[]\>
|
|
53
|
-
|
|
54
|
-
Check if user belongs to specific list of segments
|
|
55
|
-
**Example**:
|
|
56
|
-
```
|
|
57
|
-
_smartico.api.checkSegmentListMatch([1, 2, 3]).then((result) => {
|
|
58
|
-
console.log(result);
|
|
59
|
-
});
|
|
60
|
-
```
|
|
61
|
-
**Visitor mode: not supported**
|
|
62
|
-
|
|
63
|
-
#### Parameters
|
|
64
|
-
|
|
65
|
-
##### segment\_ids
|
|
66
|
-
|
|
67
|
-
`number`[]
|
|
68
|
-
|
|
69
|
-
#### Returns
|
|
70
|
-
|
|
71
|
-
`Promise`\<[`TSegmentCheckResult`](../interfaces/TSegmentCheckResult.md)[]\>
|
|
72
|
-
|
|
73
|
-
***
|
|
74
|
-
|
|
75
|
-
### getLevels()
|
|
76
|
-
|
|
77
|
-
> **getLevels**(): `Promise`\<[`TLevel`](../interfaces/TLevel.md)[]\>
|
|
78
|
-
|
|
79
|
-
Returns all the levels available to the current user
|
|
80
|
-
**Example**:
|
|
81
|
-
```
|
|
82
|
-
_smartico.api.getLevels().then((result) => {
|
|
83
|
-
console.log(result);
|
|
84
|
-
});
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
**Example in the Visitor mode**:
|
|
88
|
-
```
|
|
89
|
-
_smartico.vapi('EN').getLevels().then((result) => {
|
|
90
|
-
console.log(result);
|
|
91
|
-
});
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
#### Returns
|
|
95
|
-
|
|
96
|
-
`Promise`\<[`TLevel`](../interfaces/TLevel.md)[]\>
|
|
97
|
-
|
|
98
|
-
***
|
|
99
|
-
|
|
100
|
-
### getCurrentLevel()
|
|
101
|
-
|
|
102
|
-
> **getCurrentLevel**(): `Promise`\<[`TLevelCurrent`](../interfaces/TLevelCurrent.md)\>
|
|
103
|
-
|
|
104
|
-
Returns the current level of the user with extended information including ordinal position and progress.
|
|
105
|
-
|
|
106
|
-
**Example**:
|
|
107
|
-
```
|
|
108
|
-
_smartico.api.getCurrentLevel().then((result) => {
|
|
109
|
-
console.log(result);
|
|
110
|
-
});
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Visitor mode: not supported**
|
|
114
|
-
|
|
115
|
-
#### Returns
|
|
116
|
-
|
|
117
|
-
`Promise`\<[`TLevelCurrent`](../interfaces/TLevelCurrent.md)\>
|
|
118
|
-
|
|
119
|
-
***
|
|
120
|
-
|
|
121
|
-
### getMissions()
|
|
122
|
-
|
|
123
|
-
> **getMissions**(`__namedParameters?`): `Promise`\<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
124
|
-
|
|
125
|
-
Returns all the missions configured for the current user (server-side scoped, not filtered by Widget visibility).
|
|
126
|
-
The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
127
|
-
Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
128
|
-
The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it.
|
|
129
|
-
|
|
130
|
-
**Example**:
|
|
131
|
-
```
|
|
132
|
-
_smartico.api.getMissions().then((result) => {
|
|
133
|
-
console.log(result);
|
|
134
|
-
});
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**Example in the Visitor mode**:
|
|
138
|
-
```
|
|
139
|
-
_smartico.vapi('EN').getMissions().then((result) => {
|
|
140
|
-
console.log(result);
|
|
141
|
-
});
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
#### Parameters
|
|
145
|
-
|
|
146
|
-
##### \_\_namedParameters?
|
|
147
|
-
|
|
148
|
-
###### onUpdate?
|
|
149
|
-
|
|
150
|
-
(`data`) => `void`
|
|
151
|
-
|
|
152
|
-
#### Returns
|
|
153
|
-
|
|
154
|
-
`Promise`\<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
155
|
-
|
|
156
|
-
***
|
|
157
|
-
|
|
158
|
-
### getBadges()
|
|
159
|
-
|
|
160
|
-
> **getBadges**(): `Promise`\<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
161
|
-
|
|
162
|
-
Returns all the badges available to the current user
|
|
163
|
-
|
|
164
|
-
**Visitor mode: not supported**
|
|
165
|
-
|
|
166
|
-
#### Returns
|
|
167
|
-
|
|
168
|
-
`Promise`\<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
169
|
-
|
|
170
|
-
***
|
|
171
|
-
|
|
172
|
-
### getBonuses()
|
|
173
|
-
|
|
174
|
-
> **getBonuses**(`__namedParameters?`): `Promise`\<[`TBonus`](../interfaces/TBonus.md)[]\>
|
|
175
|
-
|
|
176
|
-
Returns all the bonuses for the current user
|
|
177
|
-
The returned bonuses are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
178
|
-
Note that each time you call getBonuses with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
179
|
-
The onUpdate callback will be called on bonus claimed and the updated bonuses will be passed to it.
|
|
180
|
-
|
|
181
|
-
**Visitor mode: not supported**
|
|
182
|
-
|
|
183
|
-
#### Parameters
|
|
184
|
-
|
|
185
|
-
##### \_\_namedParameters?
|
|
186
|
-
|
|
187
|
-
###### onUpdate?
|
|
188
|
-
|
|
189
|
-
(`data`) => `void`
|
|
190
|
-
|
|
191
|
-
#### Returns
|
|
192
|
-
|
|
193
|
-
`Promise`\<[`TBonus`](../interfaces/TBonus.md)[]\>
|
|
194
|
-
|
|
195
|
-
***
|
|
196
|
-
|
|
197
|
-
### claimBonus()
|
|
198
|
-
|
|
199
|
-
> **claimBonus**(`bonus_id`): `Promise`\<[`TClaimBonusResult`](../interfaces/TClaimBonusResult.md)\>
|
|
200
|
-
|
|
201
|
-
Claim the bonus by bonus_id. Returns the err_code in case of success or error.
|
|
202
|
-
Note that this method can be used only on integrations where originally failed bonus can be claimed again.
|
|
203
|
-
For example, user won a bonus in the mini-game, but Operator rejected this bonus.
|
|
204
|
-
This bonus will be available for the user to claim again.
|
|
205
|
-
|
|
206
|
-
**Visitor mode: not supported**
|
|
207
|
-
|
|
208
|
-
#### Parameters
|
|
209
|
-
|
|
210
|
-
##### bonus\_id
|
|
211
|
-
|
|
212
|
-
`number`
|
|
213
|
-
|
|
214
|
-
#### Returns
|
|
215
|
-
|
|
216
|
-
`Promise`\<[`TClaimBonusResult`](../interfaces/TClaimBonusResult.md)\>
|
|
217
|
-
|
|
218
|
-
***
|
|
219
|
-
|
|
220
|
-
### getUserLevelExtraCounters()
|
|
221
|
-
|
|
222
|
-
> **getUserLevelExtraCounters**(): `Promise`\<[`UserLevelExtraCountersT`](../interfaces/UserLevelExtraCountersT.md)\>
|
|
223
|
-
|
|
224
|
-
Returns the extra counters for the current user level.
|
|
225
|
-
These are counters that are configured for each Smartico client separately by request.
|
|
226
|
-
For example 1st counter could be total wagering amount, 2nd counter could be total deposit amount, etc.
|
|
227
|
-
|
|
228
|
-
**Example**:
|
|
229
|
-
```
|
|
230
|
-
_smartico.api.getUserLevelExtraCounters().then((result) => {
|
|
231
|
-
console.log(result);
|
|
232
|
-
});
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
**Visitor mode: not supported**
|
|
236
|
-
|
|
237
|
-
#### Returns
|
|
238
|
-
|
|
239
|
-
`Promise`\<[`UserLevelExtraCountersT`](../interfaces/UserLevelExtraCountersT.md)\>
|
|
240
|
-
|
|
241
|
-
***
|
|
242
|
-
|
|
243
|
-
### getStoreItems()
|
|
244
|
-
|
|
245
|
-
> **getStoreItems**(`params?`): `Promise`\<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
246
|
-
|
|
247
|
-
Returns all the store items available to the current user
|
|
248
|
-
The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
249
|
-
Note that each time you call getStoreItems with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
250
|
-
The onUpdate callback will be called on purchase of the store item.
|
|
251
|
-
|
|
252
|
-
**Example**:
|
|
253
|
-
```
|
|
254
|
-
_smartico.api.getStoreItems().then((result) => {
|
|
255
|
-
console.log(result);
|
|
256
|
-
});
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
**Example in the Visitor mode**:
|
|
260
|
-
```
|
|
261
|
-
_smartico.vapi('EN').getStoreItems().then((result) => {
|
|
262
|
-
console.log(result);
|
|
263
|
-
});
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
#### Parameters
|
|
267
|
-
|
|
268
|
-
##### params?
|
|
269
|
-
|
|
270
|
-
###### onUpdate?
|
|
271
|
-
|
|
272
|
-
(`data`) => `void`
|
|
273
|
-
|
|
274
|
-
callback function that will be called when the store items are updated
|
|
275
|
-
|
|
276
|
-
#### Returns
|
|
277
|
-
|
|
278
|
-
`Promise`\<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
279
|
-
|
|
280
|
-
***
|
|
281
|
-
|
|
282
|
-
### buyStoreItem()
|
|
283
|
-
|
|
284
|
-
> **buyStoreItem**(`item_id`): `Promise`\<[`TBuyStoreItemResult`](../interfaces/TBuyStoreItemResult.md)\>
|
|
285
|
-
|
|
286
|
-
Buy the specific shop item by item_id. Returns the err_code in case of success or error.
|
|
287
|
-
**Example**:
|
|
288
|
-
```
|
|
289
|
-
_smartico.api.buyStoreItem(1).then((result) => {
|
|
290
|
-
console.log(result);
|
|
291
|
-
});
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
**Visitor mode: not supported**
|
|
295
|
-
|
|
296
|
-
#### Parameters
|
|
297
|
-
|
|
298
|
-
##### item\_id
|
|
299
|
-
|
|
300
|
-
`number`
|
|
301
|
-
|
|
302
|
-
#### Returns
|
|
303
|
-
|
|
304
|
-
`Promise`\<[`TBuyStoreItemResult`](../interfaces/TBuyStoreItemResult.md)\>
|
|
305
|
-
|
|
306
|
-
***
|
|
307
|
-
|
|
308
|
-
### getStoreCategories()
|
|
309
|
-
|
|
310
|
-
> **getStoreCategories**(): `Promise`\<[`TStoreCategory`](../interfaces/TStoreCategory.md)[]\>
|
|
311
|
-
|
|
312
|
-
Returns store categories
|
|
313
|
-
|
|
314
|
-
**Example**:
|
|
315
|
-
```
|
|
316
|
-
_smartico.api.getStoreCategories().then((result) => {
|
|
317
|
-
console.log(result);
|
|
318
|
-
});
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
**Example in the Visitor mode**:
|
|
322
|
-
```
|
|
323
|
-
_smartico.vapi('EN').getStoreCategories().then((result) => {
|
|
324
|
-
console.log(result);
|
|
325
|
-
});
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
#### Returns
|
|
329
|
-
|
|
330
|
-
`Promise`\<[`TStoreCategory`](../interfaces/TStoreCategory.md)[]\>
|
|
331
|
-
|
|
332
|
-
***
|
|
333
|
-
|
|
334
|
-
### getStorePurchasedItems()
|
|
335
|
-
|
|
336
|
-
> **getStorePurchasedItems**(`__namedParameters?`): `Promise`\<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
337
|
-
|
|
338
|
-
Returns purchased items based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
339
|
-
The maximum number of items per request is limited to 20.
|
|
340
|
-
You can leave this params empty and by default it will return list of purchased items ranging from 0 to 20.
|
|
341
|
-
The returned store items are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
|
|
342
|
-
Note that each time you call getStorePurchasedItems with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
343
|
-
The onUpdate callback will be called on purchase of the store item and the last 20 items will be passed to it.
|
|
344
|
-
|
|
345
|
-
**Example**:
|
|
346
|
-
```
|
|
347
|
-
_smartico.api.getStorePurchasedItems().then((result) => {
|
|
348
|
-
console.log(result);
|
|
349
|
-
});
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
**Visitor mode: not supported**
|
|
353
|
-
|
|
354
|
-
#### Parameters
|
|
355
|
-
|
|
356
|
-
##### \_\_namedParameters?
|
|
357
|
-
|
|
358
|
-
###### limit?
|
|
359
|
-
|
|
360
|
-
`number`
|
|
361
|
-
|
|
362
|
-
###### offset?
|
|
363
|
-
|
|
364
|
-
`number`
|
|
365
|
-
|
|
366
|
-
###### onUpdate?
|
|
367
|
-
|
|
368
|
-
(`data`) => `void`
|
|
369
|
-
|
|
370
|
-
#### Returns
|
|
371
|
-
|
|
372
|
-
`Promise`\<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
373
|
-
|
|
374
|
-
***
|
|
375
|
-
|
|
376
|
-
### getAchCategories()
|
|
377
|
-
|
|
378
|
-
> **getAchCategories**(): `Promise`\<[`TAchCategory`](../interfaces/TAchCategory.md)[]\>
|
|
379
|
-
|
|
380
|
-
Returns missions & badges categories
|
|
381
|
-
|
|
382
|
-
**Example**:
|
|
383
|
-
```
|
|
384
|
-
_smartico.api.getAchCategories().then((result) => {
|
|
385
|
-
console.log(result);
|
|
386
|
-
});
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
**Example in the Visitor mode**:
|
|
390
|
-
```
|
|
391
|
-
_smartico.vapi('EN').getAchCategories().then((result) => {
|
|
392
|
-
console.log(result);
|
|
393
|
-
});
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
#### Returns
|
|
397
|
-
|
|
398
|
-
`Promise`\<[`TAchCategory`](../interfaces/TAchCategory.md)[]\>
|
|
399
|
-
|
|
400
|
-
***
|
|
401
|
-
|
|
402
|
-
### getCustomSections()
|
|
403
|
-
|
|
404
|
-
> **getCustomSections**(): `Promise`\<[`TUICustomSection`](../interfaces/TUICustomSection.md)[]\>
|
|
405
|
-
|
|
406
|
-
Returns list of custom sections
|
|
407
|
-
|
|
408
|
-
**Example**:
|
|
409
|
-
```
|
|
410
|
-
_smartico.api.getCustomSections().then((result) => {
|
|
411
|
-
console.log(result);
|
|
412
|
-
});
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
**Example in the Visitor mode**:
|
|
416
|
-
```
|
|
417
|
-
_smartico.vapi('EN').getCustomSections().then((result) => {
|
|
418
|
-
console.log(result);
|
|
419
|
-
});
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
#### Returns
|
|
423
|
-
|
|
424
|
-
`Promise`\<[`TUICustomSection`](../interfaces/TUICustomSection.md)[]\>
|
|
425
|
-
|
|
426
|
-
***
|
|
427
|
-
|
|
428
|
-
### getMiniGames()
|
|
429
|
-
|
|
430
|
-
> **getMiniGames**(`__namedParameters?`): `Promise`\<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
431
|
-
|
|
432
|
-
Returns the list of mini-games configured for the current user (not filtered by spin availability or Widget visibility).
|
|
433
|
-
The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMiniGames with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
434
|
-
The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
|
|
435
|
-
|
|
436
|
-
**Example**:
|
|
437
|
-
```
|
|
438
|
-
_smartico.api.getMiniGames().then((result) => {
|
|
439
|
-
console.log(result);
|
|
440
|
-
});
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
**Example in the Visitor mode**:
|
|
444
|
-
```
|
|
445
|
-
_smartico.vapi('EN').getMiniGames().then((result) => {
|
|
446
|
-
console.log(result);
|
|
447
|
-
});
|
|
448
|
-
```
|
|
449
|
-
|
|
450
|
-
#### Parameters
|
|
451
|
-
|
|
452
|
-
##### \_\_namedParameters?
|
|
453
|
-
|
|
454
|
-
###### onUpdate?
|
|
455
|
-
|
|
456
|
-
(`data`) => `void`
|
|
457
|
-
|
|
458
|
-
#### Returns
|
|
459
|
-
|
|
460
|
-
`Promise`\<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
461
|
-
|
|
462
|
-
***
|
|
463
|
-
|
|
464
|
-
### getMiniGamesHistory()
|
|
465
|
-
|
|
466
|
-
> **getMiniGamesHistory**(`__namedParameters`): `Promise`\<[`TSawHistory`](../interfaces/TSawHistory.md)[]\>
|
|
467
|
-
|
|
468
|
-
Returns the list of mini-games based on the provided parameters. "Limit" and "offset" indicate the range of items to be fetched.
|
|
469
|
-
The maximum number of items per request is limited to 20.
|
|
470
|
-
You can leave this params empty and by default it will return list of mini-games ranging from 0 to 20.
|
|
471
|
-
The returned list of mini-games history is cached for 30 seconds.
|
|
472
|
-
|
|
473
|
-
**Example**:
|
|
474
|
-
```
|
|
475
|
-
_smartico.api.getMiniGamesHistory().then((result) => {
|
|
476
|
-
console.log(result);
|
|
477
|
-
});
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
**Visitor mode: not supported**
|
|
481
|
-
|
|
482
|
-
#### Parameters
|
|
483
|
-
|
|
484
|
-
##### \_\_namedParameters
|
|
485
|
-
|
|
486
|
-
###### limit?
|
|
487
|
-
|
|
488
|
-
`number`
|
|
489
|
-
|
|
490
|
-
###### offset?
|
|
491
|
-
|
|
492
|
-
`number`
|
|
493
|
-
|
|
494
|
-
###### saw_template_id?
|
|
495
|
-
|
|
496
|
-
`number`
|
|
497
|
-
|
|
498
|
-
#### Returns
|
|
499
|
-
|
|
500
|
-
`Promise`\<[`TSawHistory`](../interfaces/TSawHistory.md)[]\>
|
|
501
|
-
|
|
502
|
-
***
|
|
503
|
-
|
|
504
|
-
### playMiniGame()
|
|
505
|
-
|
|
506
|
-
> **playMiniGame**(`template_id`, `__namedParameters?`): `Promise`\<[`TMiniGamePlayResult`](../interfaces/TMiniGamePlayResult.md)\>
|
|
507
|
-
|
|
508
|
-
Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
509
|
-
After playMiniGame is called, you can call getMiniGames to get the list of mini-games.The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGame with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
510
|
-
The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
|
|
511
|
-
|
|
512
|
-
**Example**:
|
|
513
|
-
```
|
|
514
|
-
_smartico.api.playMiniGame(55).then((result) => {
|
|
515
|
-
console.log(result);
|
|
516
|
-
});
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
**Visitor mode: not supported**
|
|
520
|
-
|
|
521
|
-
#### Parameters
|
|
522
|
-
|
|
523
|
-
##### template\_id
|
|
524
|
-
|
|
525
|
-
`number`
|
|
526
|
-
|
|
527
|
-
##### \_\_namedParameters?
|
|
528
|
-
|
|
529
|
-
###### onUpdate?
|
|
530
|
-
|
|
531
|
-
(`data`) => `void`
|
|
532
|
-
|
|
533
|
-
#### Returns
|
|
534
|
-
|
|
535
|
-
`Promise`\<[`TMiniGamePlayResult`](../interfaces/TMiniGamePlayResult.md)\>
|
|
536
|
-
|
|
537
|
-
***
|
|
538
|
-
|
|
539
|
-
### miniGameWinAcknowledgeRequest()
|
|
540
|
-
|
|
541
|
-
> **miniGameWinAcknowledgeRequest**(`request_id`): `Promise`\<[`SAWDoAknowledgeResponse`](../interfaces/SAWDoAknowledgeResponse.md)\>
|
|
542
|
-
|
|
543
|
-
Sends the acknowledge request with specific client_request_id from minigame history in order to claim prize
|
|
544
|
-
**Example**:
|
|
545
|
-
```
|
|
546
|
-
_smartico.api.miniGameWinAcknowledgeRequest('2a189322-31bb-4119-b943-bx7868ff8dc3').then((result) => {
|
|
547
|
-
console.log(result);
|
|
548
|
-
});
|
|
549
|
-
```
|
|
550
|
-
|
|
551
|
-
#### Parameters
|
|
552
|
-
|
|
553
|
-
##### request\_id
|
|
554
|
-
|
|
555
|
-
`string`
|
|
556
|
-
|
|
557
|
-
#### Returns
|
|
558
|
-
|
|
559
|
-
`Promise`\<[`SAWDoAknowledgeResponse`](../interfaces/SAWDoAknowledgeResponse.md)\>
|
|
560
|
-
|
|
561
|
-
***
|
|
562
|
-
|
|
563
|
-
### playMiniGameBatch()
|
|
564
|
-
|
|
565
|
-
> **playMiniGameBatch**(`template_id`, `spin_count`, `__namedParameters?`): `Promise`\<[`TMiniGamePlayBatchResult`](../interfaces/TMiniGamePlayBatchResult.md)[]\>
|
|
566
|
-
|
|
567
|
-
Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes
|
|
568
|
-
After playMiniGameBatch is called, you can call getMiniGames to get the list of mini-games. The returned list of mini-games is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call playMiniGameBatch with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
569
|
-
The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or won prize is spin/jackpot and if max count of the available user spins equals one, also if the spins were issued to the user manually in the BO. Updated templates will be passed to onUpdate callback.
|
|
570
|
-
|
|
571
|
-
**Example**:
|
|
572
|
-
```
|
|
573
|
-
_smartico.api.playMiniGameBatch(55, 10).then((result) => {
|
|
574
|
-
console.log(result);
|
|
575
|
-
});
|
|
576
|
-
```
|
|
577
|
-
**Visitor mode: not supported**
|
|
578
|
-
|
|
579
|
-
#### Parameters
|
|
580
|
-
|
|
581
|
-
##### template\_id
|
|
582
|
-
|
|
583
|
-
`number`
|
|
584
|
-
|
|
585
|
-
##### spin\_count
|
|
586
|
-
|
|
587
|
-
`number`
|
|
588
|
-
|
|
589
|
-
##### \_\_namedParameters?
|
|
590
|
-
|
|
591
|
-
###### onUpdate?
|
|
592
|
-
|
|
593
|
-
(`data`) => `void`
|
|
594
|
-
|
|
595
|
-
#### Returns
|
|
596
|
-
|
|
597
|
-
`Promise`\<[`TMiniGamePlayBatchResult`](../interfaces/TMiniGamePlayBatchResult.md)[]\>
|
|
598
|
-
|
|
599
|
-
***
|
|
600
|
-
|
|
601
|
-
### requestMissionOptIn()
|
|
602
|
-
|
|
603
|
-
> **requestMissionOptIn**(`mission_id`): `Promise`\<[`TMissionOptInResult`](../interfaces/TMissionOptInResult.md)\>
|
|
604
|
-
|
|
605
|
-
Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
606
|
-
|
|
607
|
-
**Visitor mode: not supported**
|
|
608
|
-
|
|
609
|
-
#### Parameters
|
|
610
|
-
|
|
611
|
-
##### mission\_id
|
|
612
|
-
|
|
613
|
-
`number`
|
|
614
|
-
|
|
615
|
-
#### Returns
|
|
616
|
-
|
|
617
|
-
`Promise`\<[`TMissionOptInResult`](../interfaces/TMissionOptInResult.md)\>
|
|
618
|
-
|
|
619
|
-
***
|
|
620
|
-
|
|
621
|
-
### requestMissionClaimReward()
|
|
622
|
-
|
|
623
|
-
> **requestMissionClaimReward**(`mission_id`, `ach_completed_id`): `Promise`\<[`TMissionClaimRewardResult`](../interfaces/TMissionClaimRewardResult.md)\>
|
|
624
|
-
|
|
625
|
-
Request for claim reward for the specified mission id. Returns the err_code.
|
|
626
|
-
|
|
627
|
-
**Visitor mode: not supported**
|
|
628
|
-
|
|
629
|
-
#### Parameters
|
|
630
|
-
|
|
631
|
-
##### mission\_id
|
|
632
|
-
|
|
633
|
-
`number`
|
|
634
|
-
|
|
635
|
-
##### ach\_completed\_id
|
|
636
|
-
|
|
637
|
-
`number`
|
|
638
|
-
|
|
639
|
-
#### Returns
|
|
640
|
-
|
|
641
|
-
`Promise`\<[`TMissionClaimRewardResult`](../interfaces/TMissionClaimRewardResult.md)\>
|
|
642
|
-
|
|
643
|
-
***
|
|
644
|
-
|
|
645
|
-
### getTournamentsList()
|
|
646
|
-
|
|
647
|
-
> **getTournamentsList**(`__namedParameters?`): `Promise`\<[`TTournament`](../interfaces/TTournament.md)[]\>
|
|
648
|
-
|
|
649
|
-
Returns all the active instances of tournaments
|
|
650
|
-
The returned list is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getTournamentsList with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
651
|
-
The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.
|
|
652
|
-
|
|
653
|
-
**Example**:
|
|
654
|
-
```
|
|
655
|
-
_smartico.api.getTournamentsList().then((result) => {
|
|
656
|
-
console.log(result);
|
|
657
|
-
});
|
|
658
|
-
```
|
|
659
|
-
|
|
660
|
-
**Example in the Visitor mode**:
|
|
661
|
-
```
|
|
662
|
-
_smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
663
|
-
console.log(result);
|
|
664
|
-
});
|
|
665
|
-
```
|
|
666
|
-
|
|
667
|
-
#### Parameters
|
|
668
|
-
|
|
669
|
-
##### \_\_namedParameters?
|
|
670
|
-
|
|
671
|
-
###### onUpdate?
|
|
672
|
-
|
|
673
|
-
(`data`) => `void`
|
|
674
|
-
|
|
675
|
-
#### Returns
|
|
676
|
-
|
|
677
|
-
`Promise`\<[`TTournament`](../interfaces/TTournament.md)[]\>
|
|
678
|
-
|
|
679
|
-
***
|
|
680
|
-
|
|
681
|
-
### getClans()
|
|
682
|
-
|
|
683
|
-
> **getClans**(`__namedParameters?`): `Promise`\<[`TClans`](../interfaces/TClans.md)\>
|
|
684
|
-
|
|
685
|
-
Returns clans list payload for the current user.
|
|
686
|
-
The returned payload is cached for 30 seconds.
|
|
687
|
-
If onUpdate is passed, it will be called when clans response is received.
|
|
688
|
-
|
|
689
|
-
**Visitor mode: not supported**
|
|
690
|
-
|
|
691
|
-
#### Parameters
|
|
692
|
-
|
|
693
|
-
##### \_\_namedParameters?
|
|
694
|
-
|
|
695
|
-
###### onUpdate?
|
|
696
|
-
|
|
697
|
-
(`data`) => `void`
|
|
698
|
-
|
|
699
|
-
#### Returns
|
|
700
|
-
|
|
701
|
-
`Promise`\<[`TClans`](../interfaces/TClans.md)\>
|
|
702
|
-
|
|
703
|
-
***
|
|
704
|
-
|
|
705
|
-
### getClanInfo()
|
|
706
|
-
|
|
707
|
-
> **getClanInfo**(`clanId`): `Promise`\<[`TClanInfo`](../interfaces/TClanInfo.md)\>
|
|
708
|
-
|
|
709
|
-
Returns detailed information for a specific clan including its members.
|
|
710
|
-
|
|
711
|
-
**Visitor mode: not supported**
|
|
712
|
-
|
|
713
|
-
#### Parameters
|
|
714
|
-
|
|
715
|
-
##### clanId
|
|
716
|
-
|
|
717
|
-
`number`
|
|
718
|
-
|
|
719
|
-
#### Returns
|
|
720
|
-
|
|
721
|
-
`Promise`\<[`TClanInfo`](../interfaces/TClanInfo.md)\>
|
|
722
|
-
|
|
723
|
-
***
|
|
724
|
-
|
|
725
|
-
### joinClan()
|
|
726
|
-
|
|
727
|
-
> **joinClan**(`clanId`): `Promise`\<[`TClanJoinResult`](../interfaces/TClanJoinResult.md)\>
|
|
728
|
-
|
|
729
|
-
Joins a clan on behalf of the current user.
|
|
730
|
-
|
|
731
|
-
**Visitor mode: not supported**
|
|
732
|
-
|
|
733
|
-
#### Parameters
|
|
734
|
-
|
|
735
|
-
##### clanId
|
|
736
|
-
|
|
737
|
-
`number`
|
|
738
|
-
|
|
739
|
-
#### Returns
|
|
740
|
-
|
|
741
|
-
`Promise`\<[`TClanJoinResult`](../interfaces/TClanJoinResult.md)\>
|
|
742
|
-
|
|
743
|
-
***
|
|
744
|
-
|
|
745
|
-
### getTournamentInstanceInfo()
|
|
746
|
-
|
|
747
|
-
> **getTournamentInstanceInfo**(`tournamentInstanceId`): `Promise`\<[`TTournamentDetailed`](../interfaces/TTournamentDetailed.md)\>
|
|
748
|
-
|
|
749
|
-
Returns detailed information for a specific tournament instance; the response includes tournament info and the leaderboard of players
|
|
750
|
-
|
|
751
|
-
**Example**:
|
|
752
|
-
```
|
|
753
|
-
_smartico.api.getTournamentsList().then((result) => {
|
|
754
|
-
if (result.length > 0) {
|
|
755
|
-
_smartico.api.getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
756
|
-
console.log(result);
|
|
757
|
-
});
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
```
|
|
761
|
-
|
|
762
|
-
**Example in the Visitor mode**:
|
|
763
|
-
```
|
|
764
|
-
_smartico.vapi('EN').getTournamentsList().then((result) => {
|
|
765
|
-
if (result.length > 0) {
|
|
766
|
-
_smartico.vapi('EN').getTournamentInstanceInfo(result[0].instance_id).then((result) => {
|
|
767
|
-
console.log(result);
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
});
|
|
771
|
-
```
|
|
772
|
-
|
|
773
|
-
#### Parameters
|
|
774
|
-
|
|
775
|
-
##### tournamentInstanceId
|
|
776
|
-
|
|
777
|
-
`number`
|
|
778
|
-
|
|
779
|
-
#### Returns
|
|
780
|
-
|
|
781
|
-
`Promise`\<[`TTournamentDetailed`](../interfaces/TTournamentDetailed.md)\>
|
|
782
|
-
|
|
783
|
-
***
|
|
784
|
-
|
|
785
|
-
### getClanTournamentPlayers()
|
|
786
|
-
|
|
787
|
-
> **getClanTournamentPlayers**(`tournamentInstanceId`, `clanId`): `Promise`\<[`TClanTournamentPlayers`](../interfaces/TClanTournamentPlayers.md)\>
|
|
788
|
-
|
|
789
|
-
Returns the players of a specific clan in a clan-based tournament.
|
|
790
|
-
|
|
791
|
-
**Visitor mode: not supported**
|
|
792
|
-
|
|
793
|
-
#### Parameters
|
|
794
|
-
|
|
795
|
-
##### tournamentInstanceId
|
|
796
|
-
|
|
797
|
-
`number`
|
|
798
|
-
|
|
799
|
-
##### clanId
|
|
800
|
-
|
|
801
|
-
`number`
|
|
802
|
-
|
|
803
|
-
#### Returns
|
|
804
|
-
|
|
805
|
-
`Promise`\<[`TClanTournamentPlayers`](../interfaces/TClanTournamentPlayers.md)\>
|
|
806
|
-
|
|
807
|
-
***
|
|
808
|
-
|
|
809
|
-
### registerInTournament()
|
|
810
|
-
|
|
811
|
-
> **registerInTournament**(`tournamentInstanceId`): `Promise`\<[`TTournamentRegistrationResult`](../interfaces/TTournamentRegistrationResult.md)\>
|
|
812
|
-
|
|
813
|
-
Requests registration for the specified tournament instance. Returns the err_code.
|
|
814
|
-
|
|
815
|
-
**Visitor mode: not supported**
|
|
816
|
-
|
|
817
|
-
#### Parameters
|
|
818
|
-
|
|
819
|
-
##### tournamentInstanceId
|
|
820
|
-
|
|
821
|
-
`number`
|
|
822
|
-
|
|
823
|
-
#### Returns
|
|
824
|
-
|
|
825
|
-
`Promise`\<[`TTournamentRegistrationResult`](../interfaces/TTournamentRegistrationResult.md)\>
|
|
826
|
-
|
|
827
|
-
***
|
|
828
|
-
|
|
829
|
-
### getLeaderBoard()
|
|
830
|
-
|
|
831
|
-
> **getLeaderBoard**(`periodType`, `getPreviousPeriod?`): `Promise`\<[`LeaderBoardDetailsT`](../interfaces/LeaderBoardDetailsT.md)\>
|
|
832
|
-
|
|
833
|
-
Returns the leaderboard for the current type (default is Daily). If getPreviousPeriod is passed as true, a leaderboard for the previous period for the current type will be returned.
|
|
834
|
-
For example, if the type is Weekly and getPreviousPeriod is true, a leaderboard for the previous week will be returned.
|
|
835
|
-
|
|
836
|
-
**Example**:
|
|
837
|
-
```
|
|
838
|
-
_smartico.api.getLeaderBoard(1).then((result) => {
|
|
839
|
-
console.log(result);
|
|
840
|
-
});
|
|
841
|
-
```
|
|
842
|
-
|
|
843
|
-
**Example in the Visitor mode**:
|
|
844
|
-
```
|
|
845
|
-
_smartico.vapi('EN').getLeaderBoard(1).then((result) => {
|
|
846
|
-
console.log(result);
|
|
847
|
-
});
|
|
848
|
-
```
|
|
849
|
-
|
|
850
|
-
#### Parameters
|
|
851
|
-
|
|
852
|
-
##### periodType
|
|
853
|
-
|
|
854
|
-
[`LeaderBoardPeriodType`](../enumerations/LeaderBoardPeriodType.md)
|
|
855
|
-
|
|
856
|
-
##### getPreviousPeriod?
|
|
857
|
-
|
|
858
|
-
`boolean`
|
|
859
|
-
|
|
860
|
-
#### Returns
|
|
861
|
-
|
|
862
|
-
`Promise`\<[`LeaderBoardDetailsT`](../interfaces/LeaderBoardDetailsT.md)\>
|
|
863
|
-
|
|
864
|
-
***
|
|
865
|
-
|
|
866
|
-
### getInboxMessages()
|
|
867
|
-
|
|
868
|
-
> **getInboxMessages**(`params?`): `Promise`\<[`TInboxMessage`](../interfaces/TInboxMessage.md)[]\>
|
|
869
|
-
|
|
870
|
-
Returns inbox messages based on the provided parameters. "From" and "to" indicate the range of messages to be fetched.
|
|
871
|
-
The maximum number of messages per request is limited to 20.
|
|
872
|
-
An indicator "onlyFavorite" can be passed to get only messages marked as favorites.
|
|
873
|
-
An indicator "read_status" can be passed to get only messages marked as read or unread.
|
|
874
|
-
You can leave this params empty and by default it will return list of messages ranging from 0 to 20.
|
|
875
|
-
This function returns a list of messages without the body of each message.
|
|
876
|
-
To get the body of the message you need to call getInboxMessageBody function and pass the message guid contained in each message of this request.
|
|
877
|
-
All other action like mark as read, favorite, delete, etc. can be done using this message GUID.
|
|
878
|
-
The "onUpdate" callback will be triggered when the user receives a new message. It will provide an updated list of messages, ranging from 0 to 20, to the onUpdate callback function.
|
|
879
|
-
|
|
880
|
-
**Visitor mode: not supported**
|
|
881
|
-
|
|
882
|
-
#### Parameters
|
|
883
|
-
|
|
884
|
-
##### params?
|
|
885
|
-
|
|
886
|
-
###### from?
|
|
887
|
-
|
|
888
|
-
`number`
|
|
889
|
-
|
|
890
|
-
###### to?
|
|
891
|
-
|
|
892
|
-
`number`
|
|
893
|
-
|
|
894
|
-
###### onlyFavorite?
|
|
895
|
-
|
|
896
|
-
`boolean`
|
|
897
|
-
|
|
898
|
-
###### categoryId?
|
|
899
|
-
|
|
900
|
-
[`InboxCategories`](../enumerations/InboxCategories.md)
|
|
901
|
-
|
|
902
|
-
###### read_status?
|
|
903
|
-
|
|
904
|
-
[`InboxReadStatus`](../enumerations/InboxReadStatus.md)
|
|
905
|
-
|
|
906
|
-
###### onUpdate?
|
|
907
|
-
|
|
908
|
-
(`data`) => `void`
|
|
909
|
-
|
|
910
|
-
#### Returns
|
|
911
|
-
|
|
912
|
-
`Promise`\<[`TInboxMessage`](../interfaces/TInboxMessage.md)[]\>
|
|
913
|
-
|
|
914
|
-
***
|
|
915
|
-
|
|
916
|
-
### getInboxUnreadCount()
|
|
917
|
-
|
|
918
|
-
> **getInboxUnreadCount**(`params?`): `Promise`\<`number`\>
|
|
919
|
-
|
|
920
|
-
Returns inbox unread count.
|
|
921
|
-
|
|
922
|
-
**Visitor mode: not supported**
|
|
923
|
-
|
|
924
|
-
#### Parameters
|
|
925
|
-
|
|
926
|
-
##### params?
|
|
927
|
-
|
|
928
|
-
###### onUpdate?
|
|
929
|
-
|
|
930
|
-
(`unread_count`) => `void`
|
|
931
|
-
|
|
932
|
-
#### Returns
|
|
933
|
-
|
|
934
|
-
`Promise`\<`number`\>
|
|
935
|
-
|
|
936
|
-
***
|
|
937
|
-
|
|
938
|
-
### getInboxMessageBody()
|
|
939
|
-
|
|
940
|
-
> **getInboxMessageBody**(`messageGuid`): `Promise`\<[`TInboxMessageBody`](../interfaces/TInboxMessageBody.md)\>
|
|
941
|
-
|
|
942
|
-
Returns the message body of the specified message guid.
|
|
943
|
-
|
|
944
|
-
**Visitor mode: not supported**
|
|
945
|
-
|
|
946
|
-
#### Parameters
|
|
947
|
-
|
|
948
|
-
##### messageGuid
|
|
949
|
-
|
|
950
|
-
`string`
|
|
951
|
-
|
|
952
|
-
#### Returns
|
|
953
|
-
|
|
954
|
-
`Promise`\<[`TInboxMessageBody`](../interfaces/TInboxMessageBody.md)\>
|
|
955
|
-
|
|
956
|
-
***
|
|
957
|
-
|
|
958
|
-
### markInboxMessageAsRead()
|
|
959
|
-
|
|
960
|
-
> **markInboxMessageAsRead**(`messageGuid`): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
961
|
-
|
|
962
|
-
Requests to mark inbox message with specified guid as read
|
|
963
|
-
|
|
964
|
-
**Visitor mode: not supported**
|
|
965
|
-
|
|
966
|
-
#### Parameters
|
|
967
|
-
|
|
968
|
-
##### messageGuid
|
|
969
|
-
|
|
970
|
-
`string`
|
|
971
|
-
|
|
972
|
-
#### Returns
|
|
973
|
-
|
|
974
|
-
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
975
|
-
|
|
976
|
-
***
|
|
977
|
-
|
|
978
|
-
### markAllInboxMessagesAsRead()
|
|
979
|
-
|
|
980
|
-
> **markAllInboxMessagesAsRead**(): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
981
|
-
|
|
982
|
-
Requests to mark all inbox messages as read
|
|
983
|
-
|
|
984
|
-
**Visitor mode: not supported**
|
|
985
|
-
|
|
986
|
-
#### Returns
|
|
987
|
-
|
|
988
|
-
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
989
|
-
|
|
990
|
-
***
|
|
991
|
-
|
|
992
|
-
### markUnmarkInboxMessageAsFavorite()
|
|
993
|
-
|
|
994
|
-
> **markUnmarkInboxMessageAsFavorite**(`messageGuid`, `mark`): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
995
|
-
|
|
996
|
-
Requests to mark inbox message with specified guid as favorite. Pass mark true to add message to favorite and false to remove.
|
|
997
|
-
|
|
998
|
-
**Visitor mode: not supported**
|
|
999
|
-
|
|
1000
|
-
#### Parameters
|
|
1001
|
-
|
|
1002
|
-
##### messageGuid
|
|
1003
|
-
|
|
1004
|
-
`string`
|
|
1005
|
-
|
|
1006
|
-
##### mark
|
|
1007
|
-
|
|
1008
|
-
`boolean`
|
|
1009
|
-
|
|
1010
|
-
#### Returns
|
|
1011
|
-
|
|
1012
|
-
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
1013
|
-
|
|
1014
|
-
***
|
|
1015
|
-
|
|
1016
|
-
### deleteInboxMessage()
|
|
1017
|
-
|
|
1018
|
-
> **deleteInboxMessage**(`messageGuid`): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
1019
|
-
|
|
1020
|
-
Requests to delete inbox message
|
|
1021
|
-
|
|
1022
|
-
**Visitor mode: not supported**
|
|
1023
|
-
|
|
1024
|
-
#### Parameters
|
|
1025
|
-
|
|
1026
|
-
##### messageGuid
|
|
1027
|
-
|
|
1028
|
-
`string`
|
|
1029
|
-
|
|
1030
|
-
#### Returns
|
|
1031
|
-
|
|
1032
|
-
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
1033
|
-
|
|
1034
|
-
***
|
|
1035
|
-
|
|
1036
|
-
### deleteAllInboxMessages()
|
|
1037
|
-
|
|
1038
|
-
> **deleteAllInboxMessages**(): `Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
1039
|
-
|
|
1040
|
-
Requests to delete all inbox messages
|
|
1041
|
-
|
|
1042
|
-
**Visitor mode: not supported**
|
|
1043
|
-
|
|
1044
|
-
#### Returns
|
|
1045
|
-
|
|
1046
|
-
`Promise`\<[`InboxMarkMessageAction`](../interfaces/InboxMarkMessageAction.md)\>
|
|
1047
|
-
|
|
1048
|
-
***
|
|
1049
|
-
|
|
1050
|
-
### getTranslations()
|
|
1051
|
-
|
|
1052
|
-
> **getTranslations**(`lang_code`): `Promise`\<[`TGetTranslations`](../interfaces/TGetTranslations.md)\>
|
|
1053
|
-
|
|
1054
|
-
Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
|
|
1055
|
-
|
|
1056
|
-
#### Parameters
|
|
1057
|
-
|
|
1058
|
-
##### lang\_code
|
|
1059
|
-
|
|
1060
|
-
`string`
|
|
1061
|
-
|
|
1062
|
-
#### Returns
|
|
1063
|
-
|
|
1064
|
-
`Promise`\<[`TGetTranslations`](../interfaces/TGetTranslations.md)\>
|
|
1065
|
-
|
|
1066
|
-
***
|
|
1067
|
-
|
|
1068
|
-
### reportImpressionEvent()
|
|
1069
|
-
|
|
1070
|
-
> **reportImpressionEvent**(`params`): `void`
|
|
1071
|
-
|
|
1072
|
-
Reports an impression event for an engagement (when engagement content is displayed to the user).
|
|
1073
|
-
Use this method to track when users view engagement content such as inbox messages, popups.
|
|
1074
|
-
When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType.
|
|
1075
|
-
|
|
1076
|
-
**Example**:
|
|
1077
|
-
```
|
|
1078
|
-
_smartico.api.reportImpressionEvent({
|
|
1079
|
-
engagement_uid: 'abc123-def456',
|
|
1080
|
-
activityType: 31 // Inbox
|
|
1081
|
-
});
|
|
1082
|
-
```
|
|
1083
|
-
|
|
1084
|
-
**Visitor mode: not supported**
|
|
1085
|
-
|
|
1086
|
-
#### Parameters
|
|
1087
|
-
|
|
1088
|
-
##### params
|
|
1089
|
-
|
|
1090
|
-
Event parameters
|
|
1091
|
-
|
|
1092
|
-
###### engagement_uid
|
|
1093
|
-
|
|
1094
|
-
`string`
|
|
1095
|
-
|
|
1096
|
-
Unique identifier for the engagement
|
|
1097
|
-
|
|
1098
|
-
###### activityType
|
|
1099
|
-
|
|
1100
|
-
`number`
|
|
1101
|
-
|
|
1102
|
-
Type of engagement activity (Popup=30, Inbox=31)
|
|
1103
|
-
|
|
1104
|
-
#### Returns
|
|
1105
|
-
|
|
1106
|
-
`void`
|
|
1107
|
-
|
|
1108
|
-
***
|
|
1109
|
-
|
|
1110
|
-
### reportClickEvent()
|
|
1111
|
-
|
|
1112
|
-
> **reportClickEvent**(`params`): `void`
|
|
1113
|
-
|
|
1114
|
-
Reports a click/action event for an engagement (when user interacts with engagement content).
|
|
1115
|
-
Use this method to track when users click on or interact with engagement content such as inbox messages, popups.
|
|
1116
|
-
When using for Inbox cases, you need to use message guid as engagement_uid, and pass 31 as activityType, and pass the action/deeplink that was triggered by the user interaction as action.
|
|
1117
|
-
|
|
1118
|
-
**Example**:
|
|
1119
|
-
```
|
|
1120
|
-
_smartico.api.reportClickEvent({
|
|
1121
|
-
engagement_uid: 'abc123-def456',
|
|
1122
|
-
activityType: 31 // Inbox
|
|
1123
|
-
action: 'dp:gf_missions'
|
|
1124
|
-
});
|
|
1125
|
-
```
|
|
1126
|
-
|
|
1127
|
-
**Visitor mode: not supported**
|
|
1128
|
-
|
|
1129
|
-
#### Parameters
|
|
1130
|
-
|
|
1131
|
-
##### params
|
|
1132
|
-
|
|
1133
|
-
Event parameters
|
|
1134
|
-
|
|
1135
|
-
###### engagement_uid
|
|
1136
|
-
|
|
1137
|
-
`string`
|
|
1138
|
-
|
|
1139
|
-
Unique identifier for the engagement
|
|
1140
|
-
|
|
1141
|
-
###### activityType
|
|
1142
|
-
|
|
1143
|
-
`number`
|
|
1144
|
-
|
|
1145
|
-
Type of engagement activity (Popup=30, Inbox=31)
|
|
1146
|
-
|
|
1147
|
-
###### action?
|
|
1148
|
-
|
|
1149
|
-
`string`
|
|
1150
|
-
|
|
1151
|
-
Optional action/deeplink that was triggered by the user interaction
|
|
1152
|
-
|
|
1153
|
-
#### Returns
|
|
1154
|
-
|
|
1155
|
-
`void`
|
|
1156
|
-
|
|
1157
|
-
***
|
|
1158
|
-
|
|
1159
|
-
### getActivityLog()
|
|
1160
|
-
|
|
1161
|
-
> **getActivityLog**(`params`): `Promise`\<[`TActivityLog`](../interfaces/TActivityLog.md)[]\>
|
|
1162
|
-
|
|
1163
|
-
Returns the activity log for a user within a specified time range.
|
|
1164
|
-
The response includes both points changes and gems/diamonds changes.
|
|
1165
|
-
Each log entry contains information about the change amount, balance, and source.
|
|
1166
|
-
The returned list is cached for 30 seconds.
|
|
1167
|
-
You can pass the onUpdate callback as a parameter, it will be called every time the activity log is updated and will provide the updated list of activity logs for the last 10 minutes.
|
|
1168
|
-
|
|
1169
|
-
**Example**:
|
|
1170
|
-
```
|
|
1171
|
-
const startTime = Math.floor(Date.now() / 1000) - 86400 * 30; // 30 days ago
|
|
1172
|
-
const endTime = Math.floor(Date.now() / 1000); // now
|
|
1173
|
-
|
|
1174
|
-
_smartico.api.getActivityLog({
|
|
1175
|
-
startTimeSeconds: startTime,
|
|
1176
|
-
endTimeSeconds: endTime,
|
|
1177
|
-
from: 0,
|
|
1178
|
-
to: 50,
|
|
1179
|
-
onUpdate: (data) => console.log('Updated:', data)
|
|
1180
|
-
}).then((result) => {
|
|
1181
|
-
console.log(result);
|
|
1182
|
-
});
|
|
1183
|
-
```
|
|
1184
|
-
|
|
1185
|
-
**Visitor mode: not supported**
|
|
1186
|
-
|
|
1187
|
-
#### Parameters
|
|
1188
|
-
|
|
1189
|
-
##### params
|
|
1190
|
-
|
|
1191
|
-
Activity log parameters
|
|
1192
|
-
|
|
1193
|
-
###### startTimeSeconds
|
|
1194
|
-
|
|
1195
|
-
`number`
|
|
1196
|
-
|
|
1197
|
-
Start time in seconds (epoch timestamp)
|
|
1198
|
-
|
|
1199
|
-
###### endTimeSeconds
|
|
1200
|
-
|
|
1201
|
-
`number`
|
|
1202
|
-
|
|
1203
|
-
End time in seconds (epoch timestamp)
|
|
1204
|
-
|
|
1205
|
-
###### from
|
|
1206
|
-
|
|
1207
|
-
`number`
|
|
1208
|
-
|
|
1209
|
-
Start index of records to return
|
|
1210
|
-
|
|
1211
|
-
###### to
|
|
1212
|
-
|
|
1213
|
-
`number`
|
|
1214
|
-
|
|
1215
|
-
End index of records to return
|
|
1216
|
-
|
|
1217
|
-
###### onUpdate?
|
|
1218
|
-
|
|
1219
|
-
(`data`) => `void`
|
|
1220
|
-
|
|
1221
|
-
Optional callback function that will be called when the activity log is updated
|
|
1222
|
-
|
|
1223
|
-
#### Returns
|
|
1224
|
-
|
|
1225
|
-
`Promise`\<[`TActivityLog`](../interfaces/TActivityLog.md)[]\>
|
|
1226
|
-
|
|
1227
|
-
***
|
|
1228
|
-
|
|
1229
|
-
### gamePickGetActiveRounds()
|
|
1230
|
-
|
|
1231
|
-
> **gamePickGetActiveRounds**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)[]\>\>
|
|
1232
|
-
|
|
1233
|
-
Returns the active rounds for the specified MatchX or Quiz game.
|
|
1234
|
-
Each round includes its events (matches/questions) along with the current user's selections and scores.
|
|
1235
|
-
|
|
1236
|
-
#### Parameters
|
|
1237
|
-
|
|
1238
|
-
##### props
|
|
1239
|
-
|
|
1240
|
-
[`GamePickRequestParams`](../interfaces/GamePickRequestParams.md)
|
|
1241
|
-
|
|
1242
|
-
#### Returns
|
|
1243
|
-
|
|
1244
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)[]\>\>
|
|
1245
|
-
|
|
1246
|
-
***
|
|
1247
|
-
|
|
1248
|
-
### gamePickGetActiveRound()
|
|
1249
|
-
|
|
1250
|
-
> **gamePickGetActiveRound**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1251
|
-
|
|
1252
|
-
Returns a single active round for the specified MatchX or Quiz game.
|
|
1253
|
-
The round includes full event details with the current user's selections.
|
|
1254
|
-
|
|
1255
|
-
#### Parameters
|
|
1256
|
-
|
|
1257
|
-
##### props
|
|
1258
|
-
|
|
1259
|
-
[`GamePickRoundRequestParams`](../interfaces/GamePickRoundRequestParams.md)
|
|
1260
|
-
|
|
1261
|
-
#### Returns
|
|
1262
|
-
|
|
1263
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1264
|
-
|
|
1265
|
-
***
|
|
1266
|
-
|
|
1267
|
-
### gamePickGetHistory()
|
|
1268
|
-
|
|
1269
|
-
> **gamePickGetHistory**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)[]\>\>
|
|
1270
|
-
|
|
1271
|
-
Returns the history of all rounds (including resolved ones) for the specified MatchX or Quiz game.
|
|
1272
|
-
Each round contains full event details with results and the current user's predictions.
|
|
1273
|
-
|
|
1274
|
-
#### Parameters
|
|
1275
|
-
|
|
1276
|
-
##### props
|
|
1277
|
-
|
|
1278
|
-
[`GamePickRequestParams`](../interfaces/GamePickRequestParams.md)
|
|
1279
|
-
|
|
1280
|
-
#### Returns
|
|
1281
|
-
|
|
1282
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)[]\>\>
|
|
1283
|
-
|
|
1284
|
-
***
|
|
1285
|
-
|
|
1286
|
-
### gamePickGetBoard()
|
|
1287
|
-
|
|
1288
|
-
> **gamePickGetBoard**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRoundBoard`](../interfaces/GamePickRoundBoard.md)\>\>
|
|
1289
|
-
|
|
1290
|
-
Returns the leaderboard for a specific round within a MatchX or Quiz game.
|
|
1291
|
-
Use `round_id = -1` (AllRoundsGameBoardID) to get the season/overall leaderboard across all rounds.
|
|
1292
|
-
|
|
1293
|
-
#### Parameters
|
|
1294
|
-
|
|
1295
|
-
##### props
|
|
1296
|
-
|
|
1297
|
-
[`GamePickRoundRequestParams`](../interfaces/GamePickRoundRequestParams.md)
|
|
1298
|
-
|
|
1299
|
-
#### Returns
|
|
1300
|
-
|
|
1301
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRoundBoard`](../interfaces/GamePickRoundBoard.md)\>\>
|
|
1302
|
-
|
|
1303
|
-
***
|
|
1304
|
-
|
|
1305
|
-
### gamePickSubmitSelection()
|
|
1306
|
-
|
|
1307
|
-
> **gamePickSubmitSelection**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1308
|
-
|
|
1309
|
-
Submits score predictions for a round in a MatchX game.
|
|
1310
|
-
Sends the round object with user selections for all events at once.
|
|
1311
|
-
Each event must include `team1_user_selection` and `team2_user_selection` representing predicted scores.
|
|
1312
|
-
If the user hasn't placed bets before, one game attempt (spin) will be consumed.
|
|
1313
|
-
Predictions can be edited until each match starts (if `allow_edit_answers` is enabled on the round).
|
|
1314
|
-
|
|
1315
|
-
#### Parameters
|
|
1316
|
-
|
|
1317
|
-
##### props
|
|
1318
|
-
|
|
1319
|
-
[`GamePickRequestParams`](../interfaces/GamePickRequestParams.md) & `object`
|
|
1320
|
-
|
|
1321
|
-
#### Returns
|
|
1322
|
-
|
|
1323
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1324
|
-
|
|
1325
|
-
***
|
|
1326
|
-
|
|
1327
|
-
### gamePickSubmitSelectionQuiz()
|
|
1328
|
-
|
|
1329
|
-
> **gamePickSubmitSelectionQuiz**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1330
|
-
|
|
1331
|
-
Submits answers for a round in a Quiz game.
|
|
1332
|
-
Sends the round object with user answers for all events at once.
|
|
1333
|
-
Each event must include `user_selection` with the answer value (e.g. '1', '2', 'x', 'yes', 'no' — depending on the market type).
|
|
1334
|
-
If the user hasn't placed bets before, one game attempt (spin) will be consumed.
|
|
1335
|
-
Answers can be edited until each match starts (if `allow_edit_answers` is enabled on the round).
|
|
1336
|
-
|
|
1337
|
-
#### Parameters
|
|
1338
|
-
|
|
1339
|
-
##### props
|
|
1340
|
-
|
|
1341
|
-
[`GamePickRequestParams`](../interfaces/GamePickRequestParams.md) & `object`
|
|
1342
|
-
|
|
1343
|
-
#### Returns
|
|
1344
|
-
|
|
1345
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1346
|
-
|
|
1347
|
-
***
|
|
1348
|
-
|
|
1349
|
-
### gamePickGetUserInfo()
|
|
1350
|
-
|
|
1351
|
-
> **gamePickGetUserInfo**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickUserInfo`](../interfaces/GamePickUserInfo.md)\>\>
|
|
1352
|
-
|
|
1353
|
-
Returns the current user's profile information within the specified MatchX or Quiz game.
|
|
1354
|
-
The user record is synced from the Smartico platform into the games DB (synced every 1 minute).
|
|
1355
|
-
If the user doesn't exist in the games DB yet, it will be created automatically on first call.
|
|
1356
|
-
|
|
1357
|
-
#### Parameters
|
|
1358
|
-
|
|
1359
|
-
##### props
|
|
1360
|
-
|
|
1361
|
-
[`GamePickRequestParams`](../interfaces/GamePickRequestParams.md)
|
|
1362
|
-
|
|
1363
|
-
#### Returns
|
|
1364
|
-
|
|
1365
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickUserInfo`](../interfaces/GamePickUserInfo.md)\>\>
|
|
1366
|
-
|
|
1367
|
-
***
|
|
1368
|
-
|
|
1369
|
-
### gamePickGetGameInfo()
|
|
1370
|
-
|
|
1371
|
-
> **gamePickGetGameInfo**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickGameInfo`](../interfaces/GamePickGameInfo.md)\>\>
|
|
1372
|
-
|
|
1373
|
-
Returns the game configuration and the list of all rounds for the specified MatchX or Quiz game.
|
|
1374
|
-
Includes the SAW template definition, label settings, and round metadata (without events).
|
|
1375
|
-
|
|
1376
|
-
#### Parameters
|
|
1377
|
-
|
|
1378
|
-
##### props
|
|
1379
|
-
|
|
1380
|
-
[`GamePickRequestParams`](../interfaces/GamePickRequestParams.md)
|
|
1381
|
-
|
|
1382
|
-
#### Returns
|
|
1383
|
-
|
|
1384
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickGameInfo`](../interfaces/GamePickGameInfo.md)\>\>
|
|
1385
|
-
|
|
1386
|
-
***
|
|
1387
|
-
|
|
1388
|
-
### gamePickGetRoundInfoForUser()
|
|
1389
|
-
|
|
1390
|
-
> **gamePickGetRoundInfoForUser**(`props`): `Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1391
|
-
|
|
1392
|
-
Returns round data with events and picks for a specific user (identified by their internal user ID).
|
|
1393
|
-
Useful for viewing another user's predictions from the leaderboard.
|
|
1394
|
-
The `int_user_id` can be obtained from the `gamePickGetBoard` response (`users[].int_user_id`).
|
|
1395
|
-
|
|
1396
|
-
#### Parameters
|
|
1397
|
-
|
|
1398
|
-
##### props
|
|
1399
|
-
|
|
1400
|
-
[`GamePickRoundRequestParams`](../interfaces/GamePickRoundRequestParams.md) & `object`
|
|
1401
|
-
|
|
1402
|
-
#### Returns
|
|
1403
|
-
|
|
1404
|
-
`Promise`\<[`GamesApiResponse`](../interfaces/GamesApiResponse.md)\<[`GamePickRound`](../interfaces/GamePickRound.md)\>\>
|
|
1405
|
-
|
|
1406
|
-
***
|
|
1407
|
-
|
|
1408
|
-
### getAvatarsList()
|
|
1409
|
-
|
|
1410
|
-
> **getAvatarsList**(): `Promise`\<[`TAvatarDefinition`](../interfaces/TAvatarDefinition.md)[]\>
|
|
1411
|
-
|
|
1412
|
-
Returns the list of avatars available in the catalog for the current user.
|
|
1413
|
-
The response includes both free avatars and earned/purchased ones.
|
|
1414
|
-
Avatars with `hide_until_achieved = true` and `is_given = false` should be hidden from the user.
|
|
1415
|
-
The result is cached for 30 seconds.
|
|
1416
|
-
|
|
1417
|
-
**Example**:
|
|
1418
|
-
```
|
|
1419
|
-
_smartico.api.getAvatarsList().then((result) => {
|
|
1420
|
-
console.log(result);
|
|
1421
|
-
});
|
|
1422
|
-
```
|
|
1423
|
-
|
|
1424
|
-
**Visitor mode: not supported**
|
|
1425
|
-
|
|
1426
|
-
#### Returns
|
|
1427
|
-
|
|
1428
|
-
`Promise`\<[`TAvatarDefinition`](../interfaces/TAvatarDefinition.md)[]\>
|
|
1429
|
-
|
|
1430
|
-
***
|
|
1431
|
-
|
|
1432
|
-
### getAvatarsCustomized()
|
|
1433
|
-
|
|
1434
|
-
> **getAvatarsCustomized**(): `Promise`\<[`TAvatarCustomized`](../interfaces/TAvatarCustomized.md)[]\>
|
|
1435
|
-
|
|
1436
|
-
Returns the list of AI-customized avatars for the current user.
|
|
1437
|
-
Each entry represents a previously generated AI customization for a specific base avatar.
|
|
1438
|
-
The result is cached for 30 seconds.
|
|
1439
|
-
|
|
1440
|
-
**Example**:
|
|
1441
|
-
```
|
|
1442
|
-
_smartico.api.getAvatarsCustomized().then((result) => {
|
|
1443
|
-
console.log(result);
|
|
1444
|
-
});
|
|
1445
|
-
```
|
|
1446
|
-
|
|
1447
|
-
**Visitor mode: not supported**
|
|
1448
|
-
|
|
1449
|
-
#### Returns
|
|
1450
|
-
|
|
1451
|
-
`Promise`\<[`TAvatarCustomized`](../interfaces/TAvatarCustomized.md)[]\>
|
|
1452
|
-
|
|
1453
|
-
***
|
|
1454
|
-
|
|
1455
|
-
### getAvatarPrompts()
|
|
1456
|
-
|
|
1457
|
-
> **getAvatarPrompts**(): `Promise`\<[`TAvatarPrompt`](../interfaces/TAvatarPrompt.md)[]\>
|
|
1458
|
-
|
|
1459
|
-
Returns the list of AI customization prompts (styles) available for avatar customization.
|
|
1460
|
-
Each prompt represents a visual style that can be applied to a base avatar.
|
|
1461
|
-
The result is cached for 30 seconds.
|
|
1462
|
-
|
|
1463
|
-
**Example**:
|
|
1464
|
-
```
|
|
1465
|
-
_smartico.api.getAvatarPrompts().then((result) => {
|
|
1466
|
-
console.log(result);
|
|
1467
|
-
});
|
|
1468
|
-
```
|
|
1469
|
-
|
|
1470
|
-
**Visitor mode: not supported**
|
|
1471
|
-
|
|
1472
|
-
#### Returns
|
|
1473
|
-
|
|
1474
|
-
`Promise`\<[`TAvatarPrompt`](../interfaces/TAvatarPrompt.md)[]\>
|
|
1475
|
-
|
|
1476
|
-
***
|
|
1477
|
-
|
|
1478
|
-
### setAvatar()
|
|
1479
|
-
|
|
1480
|
-
> **setAvatar**(`props`): `Promise`\<[`TSetAvatarResult`](../interfaces/TSetAvatarResult.md)\>
|
|
1481
|
-
|
|
1482
|
-
Sets the specified avatar as the active avatar for the current user.
|
|
1483
|
-
Pass `avatar_url` (the `TAvatarDefinition.url` path or a CDN URL for AI-customized avatars)
|
|
1484
|
-
and `avatar_real_id` from the avatar catalog.
|
|
1485
|
-
After a successful call, the avatar list cache is cleared so the next `getAvatarsList()` call reflects `is_in_use`.
|
|
1486
|
-
|
|
1487
|
-
**Example**:
|
|
1488
|
-
```
|
|
1489
|
-
_smartico.api.getAvatarsList().then((avatars) => {
|
|
1490
|
-
const avatar = avatars.find((a) => !a.hide_until_achieved || a.is_given);
|
|
1491
|
-
if (avatar) {
|
|
1492
|
-
_smartico.api.setAvatar({
|
|
1493
|
-
avatar_url: avatar.url,
|
|
1494
|
-
avatar_real_id: avatar.avatar_real_id,
|
|
1495
|
-
}).then((result) => {
|
|
1496
|
-
console.log(result);
|
|
1497
|
-
});
|
|
1498
|
-
}
|
|
1499
|
-
});
|
|
1500
|
-
```
|
|
1501
|
-
|
|
1502
|
-
**Visitor mode: not supported**
|
|
1503
|
-
|
|
1504
|
-
#### Parameters
|
|
1505
|
-
|
|
1506
|
-
##### props
|
|
1507
|
-
|
|
1508
|
-
###### avatar_url
|
|
1509
|
-
|
|
1510
|
-
`string`
|
|
1511
|
-
|
|
1512
|
-
###### avatar_real_id
|
|
1513
|
-
|
|
1514
|
-
`number`
|
|
1515
|
-
|
|
1516
|
-
#### Returns
|
|
1517
|
-
|
|
1518
|
-
`Promise`\<[`TSetAvatarResult`](../interfaces/TSetAvatarResult.md)\>
|
|
1519
|
-
|
|
1520
|
-
***
|
|
1521
|
-
|
|
1522
|
-
### jackpotGet()
|
|
1523
|
-
|
|
1524
|
-
> **jackpotGet**(`filter?`): `Promise`\<[`JackpotDetails`](../interfaces/JackpotDetails.md)[]\>
|
|
1525
|
-
|
|
1526
|
-
Returns list of Jackpots that are active in the system and matching to the filter definition.
|
|
1527
|
-
If filter is not provided, all active jackpots will be returned.
|
|
1528
|
-
Filter can be used to get jackpots related to specific game or specific jackpot template.
|
|
1529
|
-
You can call this method every second in order to get up to date information about current value of the jackpot(s) and present them to the end-users
|
|
1530
|
-
|
|
1531
|
-
**Example**:
|
|
1532
|
-
```
|
|
1533
|
-
_smartico.api.jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
1534
|
-
console.log(result);
|
|
1535
|
-
});
|
|
1536
|
-
```
|
|
1537
|
-
|
|
1538
|
-
**Example in the Visitor mode**:
|
|
1539
|
-
```
|
|
1540
|
-
_smartico.vapi('EN').jackpotGet({ related_game_id: 'wooko-slot' }).then((result) => {
|
|
1541
|
-
console.log(result);
|
|
1542
|
-
});
|
|
1543
|
-
```
|
|
1544
|
-
|
|
1545
|
-
#### Parameters
|
|
1546
|
-
|
|
1547
|
-
##### filter?
|
|
1548
|
-
|
|
1549
|
-
###### related_game_id?
|
|
1550
|
-
|
|
1551
|
-
`string`
|
|
1552
|
-
|
|
1553
|
-
###### jp_template_id?
|
|
1554
|
-
|
|
1555
|
-
`number`
|
|
1556
|
-
|
|
1557
|
-
#### Returns
|
|
1558
|
-
|
|
1559
|
-
`Promise`\<[`JackpotDetails`](../interfaces/JackpotDetails.md)[]\>
|
|
1560
|
-
|
|
1561
|
-
***
|
|
1562
|
-
|
|
1563
|
-
### jackpotOptIn()
|
|
1564
|
-
|
|
1565
|
-
> **jackpotOptIn**(`filter`): `Promise`\<[`JackpotsOptinResponse`](../interfaces/JackpotsOptinResponse.md)\>
|
|
1566
|
-
|
|
1567
|
-
Opt-in currently logged in user to the jackpot with the specified jp_template_id.
|
|
1568
|
-
You may call jackpotGet method after doing optin to see that user is opted in to the jackpot.
|
|
1569
|
-
|
|
1570
|
-
**Example**:
|
|
1571
|
-
```
|
|
1572
|
-
_smartico.api.jackpotOptIn({ jp_template_id: 123 }).then((result) => {
|
|
1573
|
-
console.log('Opted in to the jackpot');
|
|
1574
|
-
});
|
|
1575
|
-
```
|
|
1576
|
-
|
|
1577
|
-
**Visitor mode: not supported**
|
|
1578
|
-
|
|
1579
|
-
#### Parameters
|
|
1580
|
-
|
|
1581
|
-
##### filter
|
|
1582
|
-
|
|
1583
|
-
###### jp_template_id
|
|
1584
|
-
|
|
1585
|
-
`number`
|
|
1586
|
-
|
|
1587
|
-
#### Returns
|
|
1588
|
-
|
|
1589
|
-
`Promise`\<[`JackpotsOptinResponse`](../interfaces/JackpotsOptinResponse.md)\>
|
|
1590
|
-
|
|
1591
|
-
***
|
|
1592
|
-
|
|
1593
|
-
### jackpotOptOut()
|
|
1594
|
-
|
|
1595
|
-
> **jackpotOptOut**(`filter`): `Promise`\<[`JackpotsOptoutResponse`](../interfaces/JackpotsOptoutResponse.md)\>
|
|
1596
|
-
|
|
1597
|
-
Opt-out currently logged in user from the jackpot with the specified jp_template_id.
|
|
1598
|
-
You may call jackpotGet method after doing optout to see that user is not opted in to the jackpot.
|
|
1599
|
-
|
|
1600
|
-
**Example**:
|
|
1601
|
-
```
|
|
1602
|
-
_smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
|
|
1603
|
-
console.log('Opted out from the jackpot');
|
|
1604
|
-
});
|
|
1605
|
-
```
|
|
1606
|
-
|
|
1607
|
-
**Visitor mode: not supported**
|
|
1608
|
-
|
|
1609
|
-
#### Parameters
|
|
1610
|
-
|
|
1611
|
-
##### filter
|
|
1612
|
-
|
|
1613
|
-
###### jp_template_id
|
|
1614
|
-
|
|
1615
|
-
`number`
|
|
1616
|
-
|
|
1617
|
-
#### Returns
|
|
1618
|
-
|
|
1619
|
-
`Promise`\<[`JackpotsOptoutResponse`](../interfaces/JackpotsOptoutResponse.md)\>
|
|
1620
|
-
|
|
1621
|
-
***
|
|
1622
|
-
|
|
1623
|
-
### getJackpotWinners()
|
|
1624
|
-
|
|
1625
|
-
> **getJackpotWinners**(`params`): `Promise`\<[`JackpotWinnerHistory`](../interfaces/JackpotWinnerHistory.md)[]\>
|
|
1626
|
-
|
|
1627
|
-
Returns jackpot winners for the given `jp_template_id` (paginated on the server).
|
|
1628
|
-
Default page size on the wire is 20; use `limit`, `offset`, and repeated calls to load more.
|
|
1629
|
-
The full protocol response also includes `has_more`; this method returns only the `winners` array.
|
|
1630
|
-
|
|
1631
|
-
**Example**:
|
|
1632
|
-
```
|
|
1633
|
-
_smartico.api.getJackpotWinners({
|
|
1634
|
-
jp_template_id: 123,
|
|
1635
|
-
}).then((result) => {
|
|
1636
|
-
console.log(result);
|
|
1637
|
-
});
|
|
1638
|
-
```
|
|
1639
|
-
|
|
1640
|
-
**Visitor mode: not supported**
|
|
1641
|
-
|
|
1642
|
-
#### Parameters
|
|
1643
|
-
|
|
1644
|
-
##### params
|
|
1645
|
-
|
|
1646
|
-
Jackpot winners parameters
|
|
1647
|
-
|
|
1648
|
-
###### limit?
|
|
1649
|
-
|
|
1650
|
-
`number`
|
|
1651
|
-
|
|
1652
|
-
Page size (server default 20 when omitted)
|
|
1653
|
-
|
|
1654
|
-
###### offset?
|
|
1655
|
-
|
|
1656
|
-
`number`
|
|
1657
|
-
|
|
1658
|
-
Offset into the winner list
|
|
1659
|
-
|
|
1660
|
-
###### jp_template_id?
|
|
1661
|
-
|
|
1662
|
-
`number`
|
|
1663
|
-
|
|
1664
|
-
Jackpot template id (required; throws if missing)
|
|
1665
|
-
|
|
1666
|
-
#### Returns
|
|
1667
|
-
|
|
1668
|
-
`Promise`\<[`JackpotWinnerHistory`](../interfaces/JackpotWinnerHistory.md)[]\>
|
|
1669
|
-
|
|
1670
|
-
***
|
|
1671
|
-
|
|
1672
|
-
### getJackpotEligibleGames()
|
|
1673
|
-
|
|
1674
|
-
> **getJackpotEligibleGames**(`__namedParameters`): `Promise`\<[`TGetJackpotEligibleGamesResponse`](../interfaces/TGetJackpotEligibleGamesResponse.md)\>
|
|
1675
|
-
|
|
1676
|
-
Returns the eligible games for the jackpot with the specified jp_template_id.
|
|
1677
|
-
|
|
1678
|
-
**Example**:
|
|
1679
|
-
```
|
|
1680
|
-
_smartico.api.getJackpotEligibleGames({ jp_template_id: 123 }).then((result) => {
|
|
1681
|
-
console.log(result);
|
|
1682
|
-
});
|
|
1683
|
-
```
|
|
1684
|
-
|
|
1685
|
-
**Visitor mode: not supported**
|
|
1686
|
-
|
|
1687
|
-
#### Parameters
|
|
1688
|
-
|
|
1689
|
-
##### \_\_namedParameters
|
|
1690
|
-
|
|
1691
|
-
###### jp_template_id
|
|
1692
|
-
|
|
1693
|
-
`number`
|
|
1694
|
-
|
|
1695
|
-
###### onUpdate?
|
|
1696
|
-
|
|
1697
|
-
() => `void`
|
|
1698
|
-
|
|
1699
|
-
#### Returns
|
|
1700
|
-
|
|
1701
|
-
`Promise`\<[`TGetJackpotEligibleGamesResponse`](../interfaces/TGetJackpotEligibleGamesResponse.md)\>
|
|
1702
|
-
|
|
1703
|
-
***
|
|
1704
|
-
|
|
1705
|
-
### getRelatedItemsForGame()
|
|
1706
|
-
|
|
1707
|
-
> **getRelatedItemsForGame**(`related_game_id`): `Promise`\<[`GetRelatedAchTourResponse`](../interfaces/GetRelatedAchTourResponse.md)\>
|
|
1708
|
-
|
|
1709
|
-
Returns all the related tournaments and missions for the provided game id for the current user
|
|
1710
|
-
The provided Game ID should correspond to the ID from the Games Catalog - https://help.smartico.ai/welcome/technical-guides/games-catalog-api
|
|
1711
|
-
|
|
1712
|
-
**Example**:
|
|
1713
|
-
```
|
|
1714
|
-
_smartico.api.getRelatedItemsForGame('gold-slot2').then((result) => {
|
|
1715
|
-
console.log(result);
|
|
1716
|
-
});
|
|
1717
|
-
```
|
|
1718
|
-
|
|
1719
|
-
**Example in the Visitor mode**:
|
|
1720
|
-
```
|
|
1721
|
-
_smartico.vapi('EN').getRelatedItemsForGame('gold-slot2').then((result) => {
|
|
1722
|
-
console.log(result);
|
|
1723
|
-
});
|
|
1724
|
-
```
|
|
1725
|
-
|
|
1726
|
-
#### Parameters
|
|
1727
|
-
|
|
1728
|
-
##### related\_game\_id
|
|
1729
|
-
|
|
1730
|
-
`string`
|
|
1731
|
-
|
|
1732
|
-
#### Returns
|
|
1733
|
-
|
|
1734
|
-
`Promise`\<[`GetRelatedAchTourResponse`](../interfaces/GetRelatedAchTourResponse.md)\>
|
|
1735
|
-
|
|
1736
|
-
***
|
|
1737
|
-
|
|
1738
|
-
### getRaffles()
|
|
1739
|
-
|
|
1740
|
-
> **getRaffles**(`__namedParameters?`): `Promise`\<[`TRaffle`](../interfaces/TRaffle.md)[]\>
|
|
1741
|
-
|
|
1742
|
-
Returns the list of Raffles available for user
|
|
1743
|
-
The returned list of Raffles is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getRaffles with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1744
|
-
The onUpdate callback will be called on claiming prize. Updated Raffles will be passed to onUpdate callback.
|
|
1745
|
-
|
|
1746
|
-
**Example**:
|
|
1747
|
-
|
|
1748
|
-
```
|
|
1749
|
-
_smartico.api.getRaffles().then((result) => {
|
|
1750
|
-
console.log(result);
|
|
1751
|
-
});
|
|
1752
|
-
```
|
|
1753
|
-
|
|
1754
|
-
**Example in the Visitor mode**:
|
|
1755
|
-
|
|
1756
|
-
```
|
|
1757
|
-
_smartico.vapi('EN').getRaffles().then((result) => {
|
|
1758
|
-
console.log(result);
|
|
1759
|
-
});
|
|
1760
|
-
```
|
|
1761
|
-
|
|
1762
|
-
#### Parameters
|
|
1763
|
-
|
|
1764
|
-
##### \_\_namedParameters?
|
|
1765
|
-
|
|
1766
|
-
###### onUpdate?
|
|
1767
|
-
|
|
1768
|
-
(`data`) => `void`
|
|
1769
|
-
|
|
1770
|
-
#### Returns
|
|
1771
|
-
|
|
1772
|
-
`Promise`\<[`TRaffle`](../interfaces/TRaffle.md)[]\>
|
|
1773
|
-
|
|
1774
|
-
***
|
|
1775
|
-
|
|
1776
|
-
### getRaffleDrawRun()
|
|
1777
|
-
|
|
1778
|
-
> **getRaffleDrawRun**(`props`): `Promise`\<[`TRaffleDraw`](../interfaces/TRaffleDraw.md)\>
|
|
1779
|
-
|
|
1780
|
-
Returns draw run for provided raffle_id and run_id.
|
|
1781
|
-
You can pass winners_from and winners_to parameters to get a specific range of winners. Default is 0-20.
|
|
1782
|
-
|
|
1783
|
-
**Example**:
|
|
1784
|
-
|
|
1785
|
-
```javascript
|
|
1786
|
-
_smartico.api.getRaffleDrawRun({raffle_id: 156, run_id: 145}).then((result) => {
|
|
1787
|
-
console.log(result);
|
|
1788
|
-
});
|
|
1789
|
-
```
|
|
1790
|
-
|
|
1791
|
-
**Example in the Visitor mode**:
|
|
1792
|
-
|
|
1793
|
-
```javascript
|
|
1794
|
-
_smartico.vapi('EN').getRaffleDrawRun({ raffle_id: 156, run_id: 145 }).then((result) => {
|
|
1795
|
-
console.log(result);
|
|
1796
|
-
});
|
|
1797
|
-
```
|
|
1798
|
-
|
|
1799
|
-
#### Parameters
|
|
1800
|
-
|
|
1801
|
-
##### props
|
|
1802
|
-
|
|
1803
|
-
###### raffle_id
|
|
1804
|
-
|
|
1805
|
-
`number`
|
|
1806
|
-
|
|
1807
|
-
###### run_id
|
|
1808
|
-
|
|
1809
|
-
`number`
|
|
1810
|
-
|
|
1811
|
-
###### winners_from?
|
|
1812
|
-
|
|
1813
|
-
`number`
|
|
1814
|
-
|
|
1815
|
-
###### winners_to?
|
|
1816
|
-
|
|
1817
|
-
`number`
|
|
1818
|
-
|
|
1819
|
-
#### Returns
|
|
1820
|
-
|
|
1821
|
-
`Promise`\<[`TRaffleDraw`](../interfaces/TRaffleDraw.md)\>
|
|
1822
|
-
|
|
1823
|
-
***
|
|
1824
|
-
|
|
1825
|
-
### getRaffleDrawRunsHistory()
|
|
1826
|
-
|
|
1827
|
-
> **getRaffleDrawRunsHistory**(`props`): `Promise`\<[`TRaffleDrawRun`](../interfaces/TRaffleDrawRun.md)[]\>
|
|
1828
|
-
|
|
1829
|
-
Returns history of draw runs for the provided raffle_id and draw_id, if the draw_id is not provided will return history of all the draws for the provided raffle_id
|
|
1830
|
-
|
|
1831
|
-
**Example**:
|
|
1832
|
-
|
|
1833
|
-
```javascript
|
|
1834
|
-
_smartico.api.getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
|
|
1835
|
-
console.log(result);
|
|
1836
|
-
});
|
|
1837
|
-
```
|
|
1838
|
-
|
|
1839
|
-
**Example in the Visitor mode**:
|
|
1840
|
-
|
|
1841
|
-
```javascript
|
|
1842
|
-
_smartico.vapi('EN').getRaffleDrawRunsHistory({ raffle_id: 156, draw_id: 432 }).then((result) => {
|
|
1843
|
-
console.log(result);
|
|
1844
|
-
});
|
|
1845
|
-
```
|
|
1846
|
-
|
|
1847
|
-
#### Parameters
|
|
1848
|
-
|
|
1849
|
-
##### props
|
|
1850
|
-
|
|
1851
|
-
###### raffle_id
|
|
1852
|
-
|
|
1853
|
-
`number`
|
|
1854
|
-
|
|
1855
|
-
###### draw_id?
|
|
1856
|
-
|
|
1857
|
-
`number`
|
|
1858
|
-
|
|
1859
|
-
#### Returns
|
|
1860
|
-
|
|
1861
|
-
`Promise`\<[`TRaffleDrawRun`](../interfaces/TRaffleDrawRun.md)[]\>
|
|
1862
|
-
|
|
1863
|
-
***
|
|
1864
|
-
|
|
1865
|
-
### claimRafflePrize()
|
|
1866
|
-
|
|
1867
|
-
> **claimRafflePrize**(`props`): `Promise`\<[`TransformedRaffleClaimPrizeResponse`](../interfaces/TransformedRaffleClaimPrizeResponse.md)\>
|
|
1868
|
-
|
|
1869
|
-
Returns `err_code` and `err_message` after the call; `err_code` 0 means the request succeeded.
|
|
1870
|
-
|
|
1871
|
-
**Example**:
|
|
1872
|
-
|
|
1873
|
-
```javascript
|
|
1874
|
-
_smartico.api.claimRafflePrize({won_id:251}).then((result) => {
|
|
1875
|
-
console.log(result);
|
|
1876
|
-
});
|
|
1877
|
-
```
|
|
1878
|
-
|
|
1879
|
-
**Example in the Visitor mode**:
|
|
1880
|
-
|
|
1881
|
-
```javascript
|
|
1882
|
-
_smartico.vapi('EN').claimRafflePrize({ won_id: 251 }).then((result) => {
|
|
1883
|
-
console.log(result);
|
|
1884
|
-
});
|
|
1885
|
-
```
|
|
1886
|
-
|
|
1887
|
-
#### Parameters
|
|
1888
|
-
|
|
1889
|
-
##### props
|
|
1890
|
-
|
|
1891
|
-
###### won_id
|
|
1892
|
-
|
|
1893
|
-
`number`
|
|
1894
|
-
|
|
1895
|
-
#### Returns
|
|
1896
|
-
|
|
1897
|
-
`Promise`\<[`TransformedRaffleClaimPrizeResponse`](../interfaces/TransformedRaffleClaimPrizeResponse.md)\>
|
|
1898
|
-
|
|
1899
|
-
***
|
|
1900
|
-
|
|
1901
|
-
### requestRaffleOptin()
|
|
1902
|
-
|
|
1903
|
-
> **requestRaffleOptin**(`props`): `Promise`\<[`TRaffleOptinResponse`](../interfaces/TRaffleOptinResponse.md)\>
|
|
1904
|
-
|
|
1905
|
-
Requests an opt-in for the specified raffle. Returns the err_code.
|
|
1906
|
-
|
|
1907
|
-
**Visitor mode: not supported**
|
|
1908
|
-
|
|
1909
|
-
#### Parameters
|
|
1910
|
-
|
|
1911
|
-
##### props
|
|
1912
|
-
|
|
1913
|
-
###### raffle_id
|
|
1914
|
-
|
|
1915
|
-
`number`
|
|
1916
|
-
|
|
1917
|
-
###### draw_id
|
|
1918
|
-
|
|
1919
|
-
`number`
|
|
1920
|
-
|
|
1921
|
-
###### raffle_run_id
|
|
1922
|
-
|
|
1923
|
-
`number`
|
|
1924
|
-
|
|
1925
|
-
#### Returns
|
|
1926
|
-
|
|
1927
|
-
`Promise`\<[`TRaffleOptinResponse`](../interfaces/TRaffleOptinResponse.md)\>
|