@smartico/public-api 0.0.70 → 0.0.71
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/README.md +15 -0
- package/dist/WSAPI/WSAPI.d.ts +4 -4
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +4 -4
- package/dist/index.modern.mjs.map +1 -1
- package/docs/classes/WSAPI.md +4 -4
- package/package.json +1 -1
- package/src/WSAPI/WSAPI.ts +4 -4
package/docs/classes/WSAPI.md
CHANGED
|
@@ -28,7 +28,7 @@ ___
|
|
|
28
28
|
|
|
29
29
|
### getMissions
|
|
30
30
|
|
|
31
|
-
▸ **getMissions**(`«destructured
|
|
31
|
+
▸ **getMissions**(`«destructured»?`): `Promise`<[`TMissionOrBadge`](../interfaces/TMissionOrBadge.md)[]\>
|
|
32
32
|
|
|
33
33
|
Returns all the missions available the current user.
|
|
34
34
|
The returned missions is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
@@ -85,11 +85,11 @@ ___
|
|
|
85
85
|
|
|
86
86
|
### getMiniGames
|
|
87
87
|
|
|
88
|
-
▸ **getMiniGames**(`«destructured
|
|
88
|
+
▸ **getMiniGames**(`«destructured»?`): `Promise`<[`TMiniGameTemplate`](../interfaces/TMiniGameTemplate.md)[]\>
|
|
89
89
|
|
|
90
90
|
Returns the list of mini-games available for user
|
|
91
91
|
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.
|
|
92
|
-
The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one
|
|
92
|
+
The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one. Updated templates will be passed to onUpdate callback.
|
|
93
93
|
|
|
94
94
|
#### Parameters
|
|
95
95
|
|
|
@@ -124,7 +124,7 @@ ___
|
|
|
124
124
|
|
|
125
125
|
### getTournamentsList
|
|
126
126
|
|
|
127
|
-
▸ **getTournamentsList**(`«destructured
|
|
127
|
+
▸ **getTournamentsList**(`«destructured»?`): `Promise`<[`TTournament`](../interfaces/TTournament.md)[]\>
|
|
128
128
|
|
|
129
129
|
Returns all the active instances of tournaments
|
|
130
130
|
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.
|
package/package.json
CHANGED
package/src/WSAPI/WSAPI.ts
CHANGED
|
@@ -48,7 +48,7 @@ export class WSAPI {
|
|
|
48
48
|
/** Returns all the missions available the current user.
|
|
49
49
|
* The returned missions is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
50
50
|
* The onUpdate callback will be called on mission OptIn and the updated missions will be passed to it. */
|
|
51
|
-
public async getMissions({ onUpdate }: { onUpdate?: (data: TMissionOrBadge[]) => void }): Promise<TMissionOrBadge[]> {
|
|
51
|
+
public async getMissions({ onUpdate }: { onUpdate?: (data: TMissionOrBadge[]) => void } = {}): Promise<TMissionOrBadge[]> {
|
|
52
52
|
if (onUpdate) {
|
|
53
53
|
this.onUpdateCallback.set(onUpdateContextKey.Missions, onUpdate);
|
|
54
54
|
}
|
|
@@ -73,8 +73,8 @@ export class WSAPI {
|
|
|
73
73
|
|
|
74
74
|
/** Returns the list of mini-games available for user
|
|
75
75
|
* 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.
|
|
76
|
-
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one
|
|
77
|
-
public async getMiniGames({ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void }): Promise<TMiniGameTemplate[]> {
|
|
76
|
+
* The onUpdate callback will be called on available spin count change, if mini-game has increasing jackpot per spin or wined prize is spin/jackpot and if max count of the available user spin equal one. Updated templates will be passed to onUpdate callback. */
|
|
77
|
+
public async getMiniGames({ onUpdate }: { onUpdate?: (data: TMiniGameTemplate[]) => void } = {}): Promise<TMiniGameTemplate[]> {
|
|
78
78
|
if (onUpdate) {
|
|
79
79
|
this.onUpdateCallback.set(onUpdateContextKey.Saw, onUpdate);
|
|
80
80
|
}
|
|
@@ -99,7 +99,7 @@ export class WSAPI {
|
|
|
99
99
|
/** Returns all the active instances of tournaments
|
|
100
100
|
* 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.
|
|
101
101
|
* The onUpdate callback will be called when the user has registered in a tournament. Updated list will be passed to onUpdate callback.*/
|
|
102
|
-
public async getTournamentsList({ onUpdate }: { onUpdate?: (data: TTournament[]) => void }): Promise<TTournament[]> {
|
|
102
|
+
public async getTournamentsList({ onUpdate }: { onUpdate?: (data: TTournament[]) => void } = {}): Promise<TTournament[]> {
|
|
103
103
|
if (onUpdate) {
|
|
104
104
|
this.onUpdateCallback.set(onUpdateContextKey.TournamentList, onUpdate);
|
|
105
105
|
}
|