@smartico/public-api 0.0.102 → 0.0.104
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/docs/classes/WSAPI.md
CHANGED
|
@@ -16,19 +16,19 @@ ___
|
|
|
16
16
|
|
|
17
17
|
### getLevels
|
|
18
18
|
|
|
19
|
-
▸ **getLevels**(): `Promise
|
|
19
|
+
▸ **getLevels**(): `Promise`<[`TLevel`](../interfaces/TLevel.md)[]\>
|
|
20
20
|
|
|
21
21
|
Returns all the levels available the current user
|
|
22
22
|
|
|
23
23
|
#### Returns
|
|
24
24
|
|
|
25
|
-
`Promise
|
|
25
|
+
`Promise`<[`TLevel`](../interfaces/TLevel.md)[]\>
|
|
26
26
|
|
|
27
27
|
___
|
|
28
28
|
|
|
29
29
|
### getMissions
|
|
30
30
|
|
|
31
|
-
▸ **getMissions**(`params?`): `Promise
|
|
31
|
+
▸ **getMissions**(`params?`): `Promise`<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
32
32
|
|
|
33
33
|
#### Parameters
|
|
34
34
|
|
|
@@ -39,37 +39,37 @@ ___
|
|
|
39
39
|
|
|
40
40
|
#### Returns
|
|
41
41
|
|
|
42
|
-
`Promise
|
|
42
|
+
`Promise`<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
43
43
|
|
|
44
44
|
___
|
|
45
45
|
|
|
46
46
|
### getBadges
|
|
47
47
|
|
|
48
|
-
▸ **getBadges**(): `Promise
|
|
48
|
+
▸ **getBadges**(): `Promise`<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
49
49
|
|
|
50
50
|
Returns all the badges available the current user
|
|
51
51
|
|
|
52
52
|
#### Returns
|
|
53
53
|
|
|
54
|
-
`Promise
|
|
54
|
+
`Promise`<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
55
55
|
|
|
56
56
|
___
|
|
57
57
|
|
|
58
58
|
### getStoreItems
|
|
59
59
|
|
|
60
|
-
▸ **getStoreItems**(): `Promise
|
|
60
|
+
▸ **getStoreItems**(): `Promise`<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
61
61
|
|
|
62
62
|
Returns all the store items available the current user
|
|
63
63
|
|
|
64
64
|
#### Returns
|
|
65
65
|
|
|
66
|
-
`Promise
|
|
66
|
+
`Promise`<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
67
67
|
|
|
68
68
|
___
|
|
69
69
|
|
|
70
70
|
### buyStoreItem
|
|
71
71
|
|
|
72
|
-
▸ **buyStoreItem**(`item_id`): `Promise
|
|
72
|
+
▸ **buyStoreItem**(`item_id`): `Promise`<[`TBuyStoreItemResult`](../interfaces/TBuyStoreItemResult.md)\>
|
|
73
73
|
|
|
74
74
|
Buy the specific shop item by item_id. Returns the err_code.
|
|
75
75
|
|
|
@@ -81,25 +81,25 @@ Buy the specific shop item by item_id. Returns the err_code.
|
|
|
81
81
|
|
|
82
82
|
#### Returns
|
|
83
83
|
|
|
84
|
-
`Promise
|
|
84
|
+
`Promise`<[`TBuyStoreItemResult`](../interfaces/TBuyStoreItemResult.md)\>
|
|
85
85
|
|
|
86
86
|
___
|
|
87
87
|
|
|
88
88
|
### getStoreCategories
|
|
89
89
|
|
|
90
|
-
▸ **getStoreCategories**(): `Promise
|
|
90
|
+
▸ **getStoreCategories**(): `Promise`<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
91
91
|
|
|
92
92
|
Returns store categories
|
|
93
93
|
|
|
94
94
|
#### Returns
|
|
95
95
|
|
|
96
|
-
`Promise
|
|
96
|
+
`Promise`<[`TStoreItem`](../interfaces/TStoreItem.md)[]\>
|
|
97
97
|
|
|
98
98
|
___
|
|
99
99
|
|
|
100
100
|
### getMiniGames
|
|
101
101
|
|
|
102
|
-
▸ **getMiniGames**(`params?`): `Promise
|
|
102
|
+
▸ **getMiniGames**(`params?`): `Promise`<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
*
|
|
@@ -113,13 +113,13 @@ ___
|
|
|
113
113
|
|
|
114
114
|
#### Returns
|
|
115
115
|
|
|
116
|
-
`Promise
|
|
116
|
+
`Promise`<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
117
117
|
|
|
118
118
|
___
|
|
119
119
|
|
|
120
120
|
### playMiniGame
|
|
121
121
|
|
|
122
|
-
▸ **playMiniGame**(`template_id`): `Promise
|
|
122
|
+
▸ **playMiniGame**(`template_id`): `Promise`<[`TMiniGamePlayResult`](../interfaces/TMiniGamePlayResult.md)\>
|
|
123
123
|
|
|
124
124
|
Plays the specified by template_id mini-game on behalf of user and returns prize_id or err_code
|
|
125
125
|
|
|
@@ -131,13 +131,13 @@ Plays the specified by template_id mini-game on behalf of user and returns prize
|
|
|
131
131
|
|
|
132
132
|
#### Returns
|
|
133
133
|
|
|
134
|
-
`Promise
|
|
134
|
+
`Promise`<[`TMiniGamePlayResult`](../interfaces/TMiniGamePlayResult.md)\>
|
|
135
135
|
|
|
136
136
|
___
|
|
137
137
|
|
|
138
138
|
### requestMissionOptIn
|
|
139
139
|
|
|
140
|
-
▸ **requestMissionOptIn**(`mission_id`): `Promise
|
|
140
|
+
▸ **requestMissionOptIn**(`mission_id`): `Promise`<[`TMissionOptInResult`](../interfaces/TMissionOptInResult.md)\>
|
|
141
141
|
|
|
142
142
|
Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
143
143
|
|
|
@@ -149,13 +149,13 @@ Requests an opt-in for the specified mission_id. Returns the err_code.
|
|
|
149
149
|
|
|
150
150
|
#### Returns
|
|
151
151
|
|
|
152
|
-
`Promise
|
|
152
|
+
`Promise`<[`TMissionOptInResult`](../interfaces/TMissionOptInResult.md)\>
|
|
153
153
|
|
|
154
154
|
___
|
|
155
155
|
|
|
156
156
|
### getTournamentsList
|
|
157
157
|
|
|
158
|
-
▸ **getTournamentsList**(`params?`): `Promise
|
|
158
|
+
▸ **getTournamentsList**(`params?`): `Promise`<[`TTournament`](../interfaces/TTournament.md)[]\>
|
|
159
159
|
|
|
160
160
|
#### Parameters
|
|
161
161
|
|
|
@@ -166,13 +166,13 @@ ___
|
|
|
166
166
|
|
|
167
167
|
#### Returns
|
|
168
168
|
|
|
169
|
-
`Promise
|
|
169
|
+
`Promise`<[`TTournament`](../interfaces/TTournament.md)[]\>
|
|
170
170
|
|
|
171
171
|
___
|
|
172
172
|
|
|
173
173
|
### getTournamentInstanceInfo
|
|
174
174
|
|
|
175
|
-
▸ **getTournamentInstanceInfo**(`tournamentInstanceId`): `Promise
|
|
175
|
+
▸ **getTournamentInstanceInfo**(`tournamentInstanceId`): `Promise`<[`TTournamentDetailed`](../interfaces/TTournamentDetailed.md)\>
|
|
176
176
|
|
|
177
177
|
Returns details information of specific tournament instance, the response will includ tournamnet info and the leaderboard of players
|
|
178
178
|
|
|
@@ -184,13 +184,13 @@ Returns details information of specific tournament instance, the response will i
|
|
|
184
184
|
|
|
185
185
|
#### Returns
|
|
186
186
|
|
|
187
|
-
`Promise
|
|
187
|
+
`Promise`<[`TTournamentDetailed`](../interfaces/TTournamentDetailed.md)\>
|
|
188
188
|
|
|
189
189
|
___
|
|
190
190
|
|
|
191
191
|
### registerInTournament
|
|
192
192
|
|
|
193
|
-
▸ **registerInTournament**(`tournamentInstanceId`): `Promise
|
|
193
|
+
▸ **registerInTournament**(`tournamentInstanceId`): `Promise`<[`TTournamentRegistrationResult`](../interfaces/TTournamentRegistrationResult.md)\>
|
|
194
194
|
|
|
195
195
|
Requests registration for the specified tournament instance. Returns the err_code.
|
|
196
196
|
|
|
@@ -202,13 +202,13 @@ Requests registration for the specified tournament instance. Returns the err_cod
|
|
|
202
202
|
|
|
203
203
|
#### Returns
|
|
204
204
|
|
|
205
|
-
`Promise
|
|
205
|
+
`Promise`<[`TTournamentRegistrationResult`](../interfaces/TTournamentRegistrationResult.md)\>
|
|
206
206
|
|
|
207
207
|
___
|
|
208
208
|
|
|
209
209
|
### getTranslations
|
|
210
210
|
|
|
211
|
-
▸ **getTranslations**(`lang_code`): `Promise
|
|
211
|
+
▸ **getTranslations**(`lang_code`): `Promise`<[`TGetTranslations`](../interfaces/TGetTranslations.md)\>
|
|
212
212
|
|
|
213
213
|
Requests translations for the given language. Returns the object including translation key/translation value pairs. All possible translation keys defined in the back office.
|
|
214
214
|
|
|
@@ -220,4 +220,4 @@ Requests translations for the given language. Returns the object including trans
|
|
|
220
220
|
|
|
221
221
|
#### Returns
|
|
222
222
|
|
|
223
|
-
`Promise
|
|
223
|
+
`Promise`<[`TGetTranslations`](../interfaces/TGetTranslations.md)\>
|
|
@@ -361,7 +361,7 @@ ___
|
|
|
361
361
|
|
|
362
362
|
### players
|
|
363
363
|
|
|
364
|
-
• `Optional` **players**:
|
|
364
|
+
• `Optional` **players**: { `public_username`: `string` ; `avatar_url`: `string` ; `position`: `number` ; `scores`: `number` ; `is_me`: `boolean` }[]
|
|
365
365
|
|
|
366
366
|
The list of the tournament participants
|
|
367
367
|
|
|
@@ -386,4 +386,4 @@ ___
|
|
|
386
386
|
|
|
387
387
|
### prizes
|
|
388
388
|
|
|
389
|
-
• `Optional` **prizes**:
|
|
389
|
+
• `Optional` **prizes**: { `name`: `string` ; `description`: `string` ; `image_url`: `string` ; `place_from`: `number` ; `place_to`: `number` ; `type`: `string` ; `points?`: `number` }[]
|