@kokimoki/app 1.8.2 → 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 +4 -2
- package/dist/kokimoki.min.js +5 -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,8 @@ 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}`, {
|
|
666
667
|
headers: this.apiHeaders,
|
|
667
668
|
});
|
|
668
669
|
return await res.json();
|
|
@@ -674,7 +675,8 @@ export class KokimokiClient extends EventEmitter {
|
|
|
674
675
|
* @param clientId
|
|
675
676
|
*/
|
|
676
677
|
async getBestLeaderboardEntry(leaderboardName, sortDir, clientId) {
|
|
677
|
-
const
|
|
678
|
+
const encodedLeaderboardName = encodeURIComponent(leaderboardName);
|
|
679
|
+
const res = await fetch(`${this._apiUrl}/leaderboard-entries/best?leaderboardName=${encodedLeaderboardName}&sortDir=${sortDir}&clientId=${clientId || this.id}`, {
|
|
678
680
|
headers: this._apiHeaders,
|
|
679
681
|
});
|
|
680
682
|
return await res.json();
|
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,8 @@ 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}`, {
|
|
15296
15297
|
headers: this.apiHeaders,
|
|
15297
15298
|
});
|
|
15298
15299
|
return await res.json();
|
|
@@ -15304,7 +15305,8 @@ class KokimokiClient extends EventEmitter$1 {
|
|
|
15304
15305
|
* @param clientId
|
|
15305
15306
|
*/
|
|
15306
15307
|
async getBestLeaderboardEntry(leaderboardName, sortDir, clientId) {
|
|
15307
|
-
const
|
|
15308
|
+
const encodedLeaderboardName = encodeURIComponent(leaderboardName);
|
|
15309
|
+
const res = await fetch(`${this._apiUrl}/leaderboard-entries/best?leaderboardName=${encodedLeaderboardName}&sortDir=${sortDir}&clientId=${clientId || this.id}`, {
|
|
15308
15310
|
headers: this._apiHeaders,
|
|
15309
15311
|
});
|
|
15310
15312
|
return await res.json();
|