@kokimoki/app 1.8.1 → 1.8.3
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/kokimoki-client.js +8 -2
- package/dist/kokimoki.min.js +9 -3
- package/dist/kokimoki.min.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/kokimoki-client.js
CHANGED
|
@@ -662,7 +662,10 @@ export class KokimokiClient extends EventEmitter {
|
|
|
662
662
|
* @returns
|
|
663
663
|
*/
|
|
664
664
|
async listLeaderboardEntries(leaderboardName, sortDir, skip = 0, limit = 100) {
|
|
665
|
-
const
|
|
665
|
+
const encodedLeaderboardName = encodeURIComponent(leaderboardName);
|
|
666
|
+
const res = await fetch(`${this._apiUrl}/leaderboard-entries?leaderboardName=${encodedLeaderboardName}&sortDir=${sortDir}&skip=${skip}&limit=${limit}`, {
|
|
667
|
+
headers: this.apiHeaders,
|
|
668
|
+
});
|
|
666
669
|
return await res.json();
|
|
667
670
|
}
|
|
668
671
|
/**
|
|
@@ -672,7 +675,10 @@ export class KokimokiClient extends EventEmitter {
|
|
|
672
675
|
* @param clientId
|
|
673
676
|
*/
|
|
674
677
|
async getBestLeaderboardEntry(leaderboardName, sortDir, clientId) {
|
|
675
|
-
const
|
|
678
|
+
const encodedLeaderboardName = encodeURIComponent(leaderboardName);
|
|
679
|
+
const res = await fetch(`${this._apiUrl}/leaderboard-entries/best?leaderboardName=${encodedLeaderboardName}&sortDir=${sortDir}&clientId=${clientId || this.id}`, {
|
|
680
|
+
headers: this._apiHeaders,
|
|
681
|
+
});
|
|
676
682
|
return await res.json();
|
|
677
683
|
}
|
|
678
684
|
}
|
package/dist/kokimoki.min.js
CHANGED
|
@@ -486,7 +486,7 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
|
486
486
|
var eventsExports = events.exports;
|
|
487
487
|
var EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs(eventsExports);
|
|
488
488
|
|
|
489
|
-
const KOKIMOKI_APP_VERSION = "1.8.
|
|
489
|
+
const KOKIMOKI_APP_VERSION = "1.8.3";
|
|
490
490
|
|
|
491
491
|
/**
|
|
492
492
|
* Utility module to work with key-value stores.
|
|
@@ -15292,7 +15292,10 @@ class KokimokiClient extends EventEmitter$1 {
|
|
|
15292
15292
|
* @returns
|
|
15293
15293
|
*/
|
|
15294
15294
|
async listLeaderboardEntries(leaderboardName, sortDir, skip = 0, limit = 100) {
|
|
15295
|
-
const
|
|
15295
|
+
const encodedLeaderboardName = encodeURIComponent(leaderboardName);
|
|
15296
|
+
const res = await fetch(`${this._apiUrl}/leaderboard-entries?leaderboardName=${encodedLeaderboardName}&sortDir=${sortDir}&skip=${skip}&limit=${limit}`, {
|
|
15297
|
+
headers: this.apiHeaders,
|
|
15298
|
+
});
|
|
15296
15299
|
return await res.json();
|
|
15297
15300
|
}
|
|
15298
15301
|
/**
|
|
@@ -15302,7 +15305,10 @@ class KokimokiClient extends EventEmitter$1 {
|
|
|
15302
15305
|
* @param clientId
|
|
15303
15306
|
*/
|
|
15304
15307
|
async getBestLeaderboardEntry(leaderboardName, sortDir, clientId) {
|
|
15305
|
-
const
|
|
15308
|
+
const encodedLeaderboardName = encodeURIComponent(leaderboardName);
|
|
15309
|
+
const res = await fetch(`${this._apiUrl}/leaderboard-entries/best?leaderboardName=${encodedLeaderboardName}&sortDir=${sortDir}&clientId=${clientId || this.id}`, {
|
|
15310
|
+
headers: this._apiHeaders,
|
|
15311
|
+
});
|
|
15306
15312
|
return await res.json();
|
|
15307
15313
|
}
|
|
15308
15314
|
}
|