clashofclans.js 3.3.12 → 3.3.13-dev.a96b9d2
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/client/PollingClient.js +1 -1
- package/dist/index.mjs +2 -0
- package/dist/rest/RESTManager.d.ts +2 -2
- package/dist/struct/CapitalRaidSeason.d.ts +1 -1
- package/dist/struct/CapitalRaidSeason.js +10 -0
- package/dist/struct/Clan.d.ts +2 -2
- package/dist/struct/Clan.js +10 -0
- package/dist/struct/ClanMember.d.ts +1 -1
- package/dist/struct/ClanMember.js +10 -0
- package/dist/struct/ClanWar.d.ts +1 -1
- package/dist/struct/ClanWar.js +11 -1
- package/dist/struct/ClanWarLeagueGroup.d.ts +2 -2
- package/dist/struct/ClanWarLeagueGroup.js +13 -0
- package/dist/struct/ClanWarLog.d.ts +3 -3
- package/dist/struct/ClanWarLog.js +10 -0
- package/dist/struct/Player.d.ts +1 -1
- package/dist/struct/Player.js +10 -0
- package/dist/struct/PlayerClan.d.ts +2 -2
- package/dist/struct/PlayerClan.js +13 -3
- package/dist/types/api.d.ts +7 -5
- package/dist/util/Constants.d.ts +2 -0
- package/dist/util/Constants.js +3 -1
- package/dist/util/Decorators.d.ts +5 -0
- package/dist/util/Decorators.js +23 -0
- package/package.json +2 -2
- package/CHANGELOG.md +0 -173
|
@@ -30,7 +30,7 @@ class PollingClient extends Client_1.Client {
|
|
|
30
30
|
};
|
|
31
31
|
this.inMaintenance = Boolean(false);
|
|
32
32
|
this._maintenanceStartTime = null;
|
|
33
|
-
if (options?.pollingInterval &&
|
|
33
|
+
if (options?.pollingInterval && typeof options.pollingInterval !== 'number') {
|
|
34
34
|
throw new Error('The property "pollingInterval" must be a type of number.');
|
|
35
35
|
}
|
|
36
36
|
this._pollingInterval = Math.max(options?.pollingInterval ?? 1000, 1000);
|
package/dist/index.mjs
CHANGED
|
@@ -62,6 +62,8 @@ export const SuperTroops = mod.SuperTroops;
|
|
|
62
62
|
export const Troop = mod.Troop;
|
|
63
63
|
export const Unit = mod.Unit;
|
|
64
64
|
export const UnrankedLeagueData = mod.UnrankedLeagueData;
|
|
65
|
+
export const UnrankedLeagueId = mod.UnrankedLeagueId;
|
|
66
|
+
export const UnrankedWarLeagueId = mod.UnrankedWarLeagueId;
|
|
65
67
|
export const Util = mod.Util;
|
|
66
68
|
export const WarClan = mod.WarClan;
|
|
67
69
|
export const WarLeagues = mod.WarLeagues;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import { APIBuilderBaseLeague, APIBuilderBaseLeagueList, APICapitalLeague, APICapitalLeagueList, APICapitalRaidSeasons, APIClan, APIClanBuilderBaseRankingList, APIClanCapitalRankingList, APIClanList, APIClanMemberList, APIClanRankingList, APIClanWar, APIClanWarLeagueGroup,
|
|
3
|
+
import { APIBuilderBaseLeague, APIBuilderBaseLeagueList, APICapitalLeague, APICapitalLeagueList, APICapitalRaidSeasons, APIClan, APIClanBuilderBaseRankingList, APIClanCapitalRankingList, APIClanList, APIClanMemberList, APIClanRankingList, APIClanWar, APIClanWarLeagueGroup, APIClanWarLogList, APIGoldPassSeason, APILabelList, APILeague, APILeagueList, APILeagueSeasonList, APILocation, APILocationList, APIPlayer, APIPlayerBuilderBaseRankingList, APIPlayerRankingList, APIPlayerSeasonRankingList, APIVerifyToken, APIWarLeague, APIWarLeagueList, ClanSearchOptions, LoginOptions, OverrideOptions, RESTOptions, SearchOptions } from '../types';
|
|
4
4
|
import { RestEvents } from '../util/Constants';
|
|
5
5
|
import { Util } from '../util/Util';
|
|
6
6
|
import { RequestHandler } from './RequestHandler';
|
|
@@ -59,7 +59,7 @@ export declare class RESTManager extends EventEmitter {
|
|
|
59
59
|
/** Get list of clan members. */
|
|
60
60
|
getClanMembers(clanTag: string, options?: SearchOptions): Promise<import("../types").Result<APIClanMemberList>>;
|
|
61
61
|
/** Get clan war log. */
|
|
62
|
-
getClanWarLog(clanTag: string, options?: SearchOptions): Promise<import("../types").Result<
|
|
62
|
+
getClanWarLog(clanTag: string, options?: SearchOptions): Promise<import("../types").Result<APIClanWarLogList>>;
|
|
63
63
|
/** Get info about currently running war in the clan. */
|
|
64
64
|
getCurrentWar(clanTag: string, options?: OverrideOptions): Promise<import("../types").Result<APIClanWar>>;
|
|
65
65
|
/** Get info about clan war league. */
|
|
@@ -18,7 +18,6 @@ export declare class CapitalRaidSeasonMember {
|
|
|
18
18
|
}
|
|
19
19
|
/** Represents a Capital Raid Season. */
|
|
20
20
|
export declare class CapitalRaidSeason {
|
|
21
|
-
private readonly client;
|
|
22
21
|
/** The state of the raid season. */
|
|
23
22
|
state: 'ongoing' | 'ended';
|
|
24
23
|
/** The start time of the raid season. */
|
|
@@ -43,6 +42,7 @@ export declare class CapitalRaidSeason {
|
|
|
43
42
|
attackLog: APICapitalRaidSeasonAttackLog[];
|
|
44
43
|
/** The defense log of the raid season. */
|
|
45
44
|
defenseLog: APICapitalRaidSeasonDefenseLog[];
|
|
45
|
+
private readonly client;
|
|
46
46
|
constructor(client: Client, data: APICapitalRaidSeason);
|
|
47
47
|
/** Get {@link Player} info for every Player in the clan. */
|
|
48
48
|
fetchMembers(options?: OverrideOptions): Promise<Player[]>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.CapitalRaidSeason = exports.CapitalRaidSeasonMember = void 0;
|
|
10
|
+
const Decorators_1 = require("../util/Decorators");
|
|
4
11
|
const Util_1 = require("../util/Util");
|
|
5
12
|
class CapitalRaidSeasonMember {
|
|
6
13
|
constructor(data) {
|
|
@@ -38,3 +45,6 @@ class CapitalRaidSeason {
|
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
47
|
exports.CapitalRaidSeason = CapitalRaidSeason;
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, Decorators_1.Enumerable)(false)
|
|
50
|
+
], CapitalRaidSeason.prototype, "client", void 0);
|
package/dist/struct/Clan.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { Location } from './Location';
|
|
|
7
7
|
import type { Player } from './Player';
|
|
8
8
|
/** Represents a Clan. */
|
|
9
9
|
export declare class Clan {
|
|
10
|
-
client: Client;
|
|
11
10
|
/** Name of the clan. */
|
|
12
11
|
name: string;
|
|
13
12
|
/** Tag of the clan. */
|
|
@@ -37,7 +36,7 @@ export declare class Clan {
|
|
|
37
36
|
/** The minimum hall level required to apply to this clan. */
|
|
38
37
|
requiredTownHallLevel: number | null;
|
|
39
38
|
/** The frequency for when this clan goes to war. */
|
|
40
|
-
warFrequency
|
|
39
|
+
warFrequency?: 'always' | 'moreThanOncePerWeek' | 'oncePerWeek' | 'lessThanOncePerWeek' | 'never' | 'unknown';
|
|
41
40
|
/** The clan's current war winning streak. */
|
|
42
41
|
warWinStreak: number;
|
|
43
42
|
/** The number of wars the clan has won. */
|
|
@@ -65,6 +64,7 @@ export declare class Clan {
|
|
|
65
64
|
* - This property returns empty array for {@link Client.getClans} method.
|
|
66
65
|
*/
|
|
67
66
|
members: ClanMember[];
|
|
67
|
+
private readonly client;
|
|
68
68
|
constructor(client: Client, data: APIClan);
|
|
69
69
|
/** Get {@link Player} info for every Player in the clan. */
|
|
70
70
|
fetchMembers(options?: OverrideOptions): Promise<Player[]>;
|
package/dist/struct/Clan.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.Clan = void 0;
|
|
10
|
+
const Decorators_1 = require("../util/Decorators");
|
|
4
11
|
const Badge_1 = require("./Badge");
|
|
5
12
|
const ClanCapital_1 = require("./ClanCapital");
|
|
6
13
|
const ClanMember_1 = require("./ClanMember");
|
|
@@ -50,3 +57,6 @@ class Clan {
|
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
59
|
exports.Clan = Clan;
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, Decorators_1.Enumerable)(false)
|
|
62
|
+
], Clan.prototype, "client", void 0);
|
|
@@ -2,7 +2,6 @@ import { Client } from '../client/Client';
|
|
|
2
2
|
import { APIClanMember, APILeague, APIPlayerHouse, OverrideOptions } from '../types';
|
|
3
3
|
import { League } from './League';
|
|
4
4
|
export declare class ClanMember {
|
|
5
|
-
client: Client;
|
|
6
5
|
/** The member's name. */
|
|
7
6
|
name: string;
|
|
8
7
|
/** The member's tag. */
|
|
@@ -31,6 +30,7 @@ export declare class ClanMember {
|
|
|
31
30
|
received: number;
|
|
32
31
|
/** The member's player house details. */
|
|
33
32
|
playerHouse?: APIPlayerHouse | null;
|
|
33
|
+
private readonly client;
|
|
34
34
|
constructor(client: Client, data: APIClanMember);
|
|
35
35
|
/** Whether this clan member is in the clan. */
|
|
36
36
|
get isMember(): boolean;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.ClanMember = void 0;
|
|
4
10
|
const Constants_1 = require("../util/Constants");
|
|
11
|
+
const Decorators_1 = require("../util/Decorators");
|
|
5
12
|
const League_1 = require("./League");
|
|
6
13
|
class ClanMember {
|
|
7
14
|
constructor(client, data) {
|
|
@@ -45,3 +52,6 @@ class ClanMember {
|
|
|
45
52
|
}
|
|
46
53
|
}
|
|
47
54
|
exports.ClanMember = ClanMember;
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, Decorators_1.Enumerable)(false)
|
|
57
|
+
], ClanMember.prototype, "client", void 0);
|
package/dist/struct/ClanWar.d.ts
CHANGED
|
@@ -109,7 +109,6 @@ export declare class WarClan {
|
|
|
109
109
|
* :::
|
|
110
110
|
*/
|
|
111
111
|
export declare class ClanWar {
|
|
112
|
-
client: Client;
|
|
113
112
|
/**
|
|
114
113
|
* The clan's current war state.
|
|
115
114
|
*
|
|
@@ -132,6 +131,7 @@ export declare class ClanWar {
|
|
|
132
131
|
opponent: WarClan;
|
|
133
132
|
/** The war's unique tag. This is `null` unless this is a CWL. */
|
|
134
133
|
warTag: string | null;
|
|
134
|
+
private readonly client;
|
|
135
135
|
constructor(client: Client, data: APIClanWar, extra: {
|
|
136
136
|
clanTag?: string;
|
|
137
137
|
warTag?: string;
|
package/dist/struct/ClanWar.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.ClanWar = exports.WarClan = exports.ClanWarMember = exports.ClanWarAttack = void 0;
|
|
4
10
|
const Constants_1 = require("../util/Constants");
|
|
11
|
+
const Decorators_1 = require("../util/Decorators");
|
|
5
12
|
const Helper_1 = require("../util/Helper");
|
|
6
13
|
const Badge_1 = require("./Badge");
|
|
7
14
|
/** Represents a Clash of Clans War Attack. */
|
|
@@ -147,7 +154,7 @@ exports.WarClan = WarClan;
|
|
|
147
154
|
*/
|
|
148
155
|
class ClanWar {
|
|
149
156
|
constructor(client, data, extra) {
|
|
150
|
-
|
|
157
|
+
this.client = client;
|
|
151
158
|
this.state = data.state;
|
|
152
159
|
if (this.state !== 'notInWar') {
|
|
153
160
|
this.teamSize = data.teamSize;
|
|
@@ -242,3 +249,6 @@ class ClanWar {
|
|
|
242
249
|
}
|
|
243
250
|
}
|
|
244
251
|
exports.ClanWar = ClanWar;
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, Decorators_1.Enumerable)(false)
|
|
254
|
+
], ClanWar.prototype, "client", void 0);
|
|
@@ -17,7 +17,6 @@ export declare class ClanWarLeagueClanMember {
|
|
|
17
17
|
}
|
|
18
18
|
/** Represents a Clan of CWL Group. */
|
|
19
19
|
export declare class ClanWarLeagueClan {
|
|
20
|
-
private readonly client;
|
|
21
20
|
/** The clan's name. */
|
|
22
21
|
name: string;
|
|
23
22
|
/** The clan's tag. */
|
|
@@ -28,6 +27,7 @@ export declare class ClanWarLeagueClan {
|
|
|
28
27
|
badge: Badge;
|
|
29
28
|
/** An array of members that are in the CWL group. */
|
|
30
29
|
members: ClanWarLeagueClanMember[];
|
|
30
|
+
private readonly client;
|
|
31
31
|
constructor(client: Client, data: APIClanWarLeagueClan);
|
|
32
32
|
/** Get {@link Player} info for every members that are in the CWL group. */
|
|
33
33
|
fetchMembers(options?: OverrideOptions): Promise<Player[]>;
|
|
@@ -44,7 +44,6 @@ export declare class ClanWarLeagueRound {
|
|
|
44
44
|
}
|
|
45
45
|
/** Represents a CWL Group. */
|
|
46
46
|
export declare class ClanWarLeagueGroup {
|
|
47
|
-
private readonly client;
|
|
48
47
|
/** The CWL group's current war state. */
|
|
49
48
|
state: 'preparation' | 'inWar' | 'ended' | 'notInWar';
|
|
50
49
|
/** Season Id of this CWL group. */
|
|
@@ -53,6 +52,7 @@ export declare class ClanWarLeagueGroup {
|
|
|
53
52
|
clans: ClanWarLeagueClan[];
|
|
54
53
|
/** An array containing all war tags for each round. */
|
|
55
54
|
rounds: ClanWarLeagueRound[];
|
|
55
|
+
private readonly client;
|
|
56
56
|
constructor(client: Client, data: APIClanWarLeagueGroup);
|
|
57
57
|
/** Whether the clan is not in CWL group. */
|
|
58
58
|
get isNotInWar(): boolean;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.ClanWarLeagueGroup = exports.ClanWarLeagueRound = exports.ClanWarLeagueClan = exports.ClanWarLeagueClanMember = void 0;
|
|
10
|
+
const Decorators_1 = require("../util/Decorators");
|
|
4
11
|
const Badge_1 = require("./Badge");
|
|
5
12
|
/** Represents a Clan War League member. */
|
|
6
13
|
class ClanWarLeagueClanMember {
|
|
@@ -37,6 +44,9 @@ class ClanWarLeagueClan {
|
|
|
37
44
|
}
|
|
38
45
|
}
|
|
39
46
|
exports.ClanWarLeagueClan = ClanWarLeagueClan;
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, Decorators_1.Enumerable)(false)
|
|
49
|
+
], ClanWarLeagueClan.prototype, "client", void 0);
|
|
40
50
|
/** Represents a Round of CWL Group. */
|
|
41
51
|
class ClanWarLeagueRound {
|
|
42
52
|
constructor(data, round) {
|
|
@@ -102,3 +112,6 @@ class ClanWarLeagueGroup {
|
|
|
102
112
|
}
|
|
103
113
|
}
|
|
104
114
|
exports.ClanWarLeagueGroup = ClanWarLeagueGroup;
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, Decorators_1.Enumerable)(false)
|
|
117
|
+
], ClanWarLeagueGroup.prototype, "client", void 0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from '../client/Client';
|
|
2
|
-
import {
|
|
2
|
+
import { APIClanWarLog, APIWarLogClan } from '../types';
|
|
3
3
|
import { Badge } from './Badge';
|
|
4
4
|
/**
|
|
5
5
|
* Represents War Log Clan.
|
|
@@ -35,7 +35,6 @@ export declare class WarLogClan {
|
|
|
35
35
|
get shareLink(): string | null;
|
|
36
36
|
}
|
|
37
37
|
export declare class ClanWarLog {
|
|
38
|
-
client: Client;
|
|
39
38
|
/** The result of the war. */
|
|
40
39
|
result: 'win' | 'lose' | 'tie' | null;
|
|
41
40
|
/** The Date that battle day ends at. */
|
|
@@ -48,7 +47,8 @@ export declare class ClanWarLog {
|
|
|
48
47
|
clan: WarLogClan;
|
|
49
48
|
/** The opposition clan. */
|
|
50
49
|
opponent: WarLogClan;
|
|
51
|
-
|
|
50
|
+
private readonly client;
|
|
51
|
+
constructor(client: Client, data: APIClanWarLog);
|
|
52
52
|
/** Returns either `friendly`, `cwl` or `normal`. */
|
|
53
53
|
get type(): "friendly" | "cwl" | "normal";
|
|
54
54
|
/** Whether this is a friendly war. */
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.ClanWarLog = exports.WarLogClan = void 0;
|
|
10
|
+
const Decorators_1 = require("../util/Decorators");
|
|
4
11
|
const Util_1 = require("../util/Util");
|
|
5
12
|
const Badge_1 = require("./Badge");
|
|
6
13
|
/**
|
|
@@ -58,3 +65,6 @@ class ClanWarLog {
|
|
|
58
65
|
}
|
|
59
66
|
}
|
|
60
67
|
exports.ClanWarLog = ClanWarLog;
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, Decorators_1.Enumerable)(false)
|
|
70
|
+
], ClanWarLog.prototype, "client", void 0);
|
package/dist/struct/Player.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { PlayerClan } from './PlayerClan';
|
|
|
8
8
|
import { Hero, HeroEquipment, Spell, Troop } from './Unit';
|
|
9
9
|
/** Represents a Clash of Clans Player. */
|
|
10
10
|
export declare class Player {
|
|
11
|
-
client: Client;
|
|
12
11
|
/** The player's name. */
|
|
13
12
|
name: string;
|
|
14
13
|
/** The player's tag. */
|
|
@@ -65,6 +64,7 @@ export declare class Player {
|
|
|
65
64
|
heroEquipment: HeroEquipment[];
|
|
66
65
|
/** The player's clan capital house details. */
|
|
67
66
|
playerHouse?: APIPlayerHouse | null;
|
|
67
|
+
private readonly client;
|
|
68
68
|
constructor(client: Client, data: APIPlayer);
|
|
69
69
|
/** Whether this clan member is in the clan. */
|
|
70
70
|
get inClan(): boolean;
|
package/dist/struct/Player.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.Player = void 0;
|
|
4
10
|
const Constants_1 = require("../util/Constants");
|
|
11
|
+
const Decorators_1 = require("../util/Decorators");
|
|
5
12
|
const Achievement_1 = require("./Achievement");
|
|
6
13
|
const Label_1 = require("./Label");
|
|
7
14
|
const League_1 = require("./League");
|
|
@@ -104,3 +111,6 @@ class Player {
|
|
|
104
111
|
}
|
|
105
112
|
}
|
|
106
113
|
exports.Player = Player;
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, Decorators_1.Enumerable)(false)
|
|
116
|
+
], Player.prototype, "client", void 0);
|
|
@@ -3,7 +3,6 @@ import { APIPlayerClan, OverrideOptions } from '../types';
|
|
|
3
3
|
import { Badge } from './Badge';
|
|
4
4
|
/** Represents a Player's clan. */
|
|
5
5
|
export declare class PlayerClan {
|
|
6
|
-
private readonly _client;
|
|
7
6
|
/** Name of the clan. */
|
|
8
7
|
name: string;
|
|
9
8
|
/** Tag of the clan. */
|
|
@@ -16,7 +15,8 @@ export declare class PlayerClan {
|
|
|
16
15
|
level: number | null;
|
|
17
16
|
/** Badge of this clan. */
|
|
18
17
|
badge: Badge;
|
|
19
|
-
|
|
18
|
+
private readonly client;
|
|
19
|
+
constructor(client: Client, data: APIPlayerClan);
|
|
20
20
|
/** Fetch detailed clan info for the player's clan. */
|
|
21
21
|
fetch(options?: OverrideOptions): Promise<import("./Clan").Clan>;
|
|
22
22
|
/** Get clan's formatted link to open clan in-game. */
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.PlayerClan = void 0;
|
|
10
|
+
const Decorators_1 = require("../util/Decorators");
|
|
4
11
|
const Badge_1 = require("./Badge");
|
|
5
12
|
/** Represents a Player's clan. */
|
|
6
13
|
class PlayerClan {
|
|
7
|
-
constructor(
|
|
8
|
-
this.
|
|
14
|
+
constructor(client, data) {
|
|
15
|
+
this.client = client;
|
|
9
16
|
this.name = data.name;
|
|
10
17
|
this.tag = data.tag;
|
|
11
18
|
this.level = data.clanLevel ?? null; // eslint-disable-line
|
|
@@ -13,7 +20,7 @@ class PlayerClan {
|
|
|
13
20
|
}
|
|
14
21
|
/** Fetch detailed clan info for the player's clan. */
|
|
15
22
|
fetch(options) {
|
|
16
|
-
return this.
|
|
23
|
+
return this.client.getClan(this.tag, options);
|
|
17
24
|
}
|
|
18
25
|
/** Get clan's formatted link to open clan in-game. */
|
|
19
26
|
get shareLink() {
|
|
@@ -21,3 +28,6 @@ class PlayerClan {
|
|
|
21
28
|
}
|
|
22
29
|
}
|
|
23
30
|
exports.PlayerClan = PlayerClan;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, Decorators_1.Enumerable)(false)
|
|
33
|
+
], PlayerClan.prototype, "client", void 0);
|
package/dist/types/api.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface APIClan {
|
|
|
47
47
|
requiredTrophies: number;
|
|
48
48
|
requiredTownhallLevel?: number;
|
|
49
49
|
requiredBuilderBaseTrophies?: number;
|
|
50
|
-
warFrequency
|
|
50
|
+
warFrequency?: 'always' | 'moreThanOncePerWeek' | 'oncePerWeek' | 'lessThanOncePerWeek' | 'never' | 'unknown';
|
|
51
51
|
warWinStreak: number;
|
|
52
52
|
warWins: number;
|
|
53
53
|
warTies?: number;
|
|
@@ -103,6 +103,7 @@ export interface APIClanWar {
|
|
|
103
103
|
teamSize: number;
|
|
104
104
|
startTime: string;
|
|
105
105
|
preparationStartTime: string;
|
|
106
|
+
battleModifier?: 'none' | 'hardMode';
|
|
106
107
|
endTime: string;
|
|
107
108
|
clan: APIWarClan;
|
|
108
109
|
opponent: APIWarClan;
|
|
@@ -146,17 +147,18 @@ export interface APIWarLogClan {
|
|
|
146
147
|
destructionPercentage: number;
|
|
147
148
|
expEarned?: number;
|
|
148
149
|
}
|
|
149
|
-
export interface
|
|
150
|
-
result
|
|
150
|
+
export interface APIClanWarLog {
|
|
151
|
+
result?: 'win' | 'lose' | 'tie' | null;
|
|
151
152
|
endTime: string;
|
|
153
|
+
battleModifier?: 'none' | 'hardMode';
|
|
152
154
|
teamSize: number;
|
|
153
155
|
attacksPerMember?: number;
|
|
154
156
|
clan: APIWarLogClan;
|
|
155
157
|
opponent: APIWarLogClan;
|
|
156
158
|
}
|
|
157
159
|
/** /clans/{clanTag}/warlog */
|
|
158
|
-
export interface
|
|
159
|
-
items:
|
|
160
|
+
export interface APIClanWarLogList {
|
|
161
|
+
items: APIClanWarLog[];
|
|
160
162
|
paging: APIPaging;
|
|
161
163
|
}
|
|
162
164
|
/** /clans/{clanTag}/currentwar/leaguegroup */
|
package/dist/util/Constants.d.ts
CHANGED
|
@@ -19,7 +19,9 @@ export declare const UnrankedLeagueData: {
|
|
|
19
19
|
tiny: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
export declare const UnrankedLeagueId = 29000000;
|
|
22
23
|
export declare const LegendLeagueId = 29000022;
|
|
24
|
+
export declare const UnrankedWarLeagueId = 48000000;
|
|
23
25
|
export declare const Leagues: number[];
|
|
24
26
|
export declare const WarLeagues: number[];
|
|
25
27
|
export declare const FriendlyWarPreparationTimes: readonly [number, number, number, number, number, number, number, number, number, number, number, number];
|
package/dist/util/Constants.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RawData = exports.CWLRounds = exports.RestEvents = exports.ClientEvents = exports.PollingEvents = exports.FriendlyWarPreparationTimes = exports.WarLeagues = exports.Leagues = exports.LegendLeagueId = exports.UnrankedLeagueData = exports.HeroPets = exports.Heroes = exports.BuilderTroops = exports.Spells = exports.DarkElixirSpells = exports.ElixirSpells = exports.SuperTroops = exports.SiegeMachines = exports.HomeTroops = exports.DarkElixirTroops = exports.ElixirTroops = exports.DevSiteAPIBaseURL = exports.APIBaseURL = void 0;
|
|
6
|
+
exports.RawData = exports.CWLRounds = exports.RestEvents = exports.ClientEvents = exports.PollingEvents = exports.FriendlyWarPreparationTimes = exports.WarLeagues = exports.Leagues = exports.UnrankedWarLeagueId = exports.LegendLeagueId = exports.UnrankedLeagueId = exports.UnrankedLeagueData = exports.HeroPets = exports.Heroes = exports.BuilderTroops = exports.Spells = exports.DarkElixirSpells = exports.ElixirSpells = exports.SuperTroops = exports.SiegeMachines = exports.HomeTroops = exports.DarkElixirTroops = exports.ElixirTroops = exports.DevSiteAPIBaseURL = exports.APIBaseURL = void 0;
|
|
7
7
|
const raw_json_1 = __importDefault(require("../util/raw.json"));
|
|
8
8
|
exports.APIBaseURL = 'https://api.clashofclans.com/v1';
|
|
9
9
|
exports.DevSiteAPIBaseURL = 'https://developer.clashofclans.com/api';
|
|
@@ -114,7 +114,9 @@ exports.UnrankedLeagueData = {
|
|
|
114
114
|
tiny: 'https://api-assets.clashofclans.com/leagues/36/e--YMyIexEQQhE4imLoJcwhYn6Uy8KqlgyY3_kFV6t4.png'
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
|
+
exports.UnrankedLeagueId = 29000000;
|
|
117
118
|
exports.LegendLeagueId = 29000022;
|
|
119
|
+
exports.UnrankedWarLeagueId = 48000000;
|
|
118
120
|
exports.Leagues = [
|
|
119
121
|
29000000,
|
|
120
122
|
29000001,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Enumerable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Decorator that sets the enumerable property of a class field to the desired value.
|
|
6
|
+
* @param value Whether the property should be enumerable or not
|
|
7
|
+
*/
|
|
8
|
+
function Enumerable(value) {
|
|
9
|
+
return (target, key) => {
|
|
10
|
+
Reflect.defineProperty(target, key, {
|
|
11
|
+
enumerable: value,
|
|
12
|
+
set(val) {
|
|
13
|
+
Reflect.defineProperty(this, key, {
|
|
14
|
+
configurable: true,
|
|
15
|
+
enumerable: value,
|
|
16
|
+
value: val,
|
|
17
|
+
writable: true
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
exports.Enumerable = Enumerable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clashofclans.js",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.13-dev.a96b9d2",
|
|
4
4
|
"description": "JavaScript library for interacting with the Clash of Clans API",
|
|
5
5
|
"author": "https://clashofclans.js.org",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,4 +73,4 @@
|
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=16.x"
|
|
75
75
|
}
|
|
76
|
-
}
|
|
76
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
## 3.1.3 (24-12-2023)
|
|
6
|
-
|
|
7
|
-
### Features
|
|
8
|
-
|
|
9
|
-
- Town Hall 16 updates.
|
|
10
|
-
- Removed deprecated builder base properties.
|
|
11
|
-
|
|
12
|
-
## 3.1.3 (13-08-2023)
|
|
13
|
-
|
|
14
|
-
### Features
|
|
15
|
-
|
|
16
|
-
- Switched to `undici` from `node-fetch` for better performance.
|
|
17
|
-
|
|
18
|
-
## 3.1.0 (2023-07-28)
|
|
19
|
-
|
|
20
|
-
### Features
|
|
21
|
-
|
|
22
|
-
- Builder base update and new troop levels.
|
|
23
|
-
|
|
24
|
-
## 3.0.2 (2023-01-15)
|
|
25
|
-
|
|
26
|
-
### Bug Fixes
|
|
27
|
-
|
|
28
|
-
- Conflict with the same name of builder base and home base troops. (#123)
|
|
29
|
-
- Fix the issue with the `Client#getLeagueWar()` method.
|
|
30
|
-
- Typings and documentation for clan capital.
|
|
31
|
-
- Fix the issue with the `Clan#clanCapital` property.
|
|
32
|
-
|
|
33
|
-
### Features
|
|
34
|
-
|
|
35
|
-
- Added `Client#getCapitalRaidSeasons()` method.
|
|
36
|
-
- Added `Client#getCapitalLeagues()` method.
|
|
37
|
-
- Added `Client#getClanCapitalRanks()` method.
|
|
38
|
-
- Added new Super Troops in raw.json file.
|
|
39
|
-
|
|
40
|
-
### Breaking Changes
|
|
41
|
-
|
|
42
|
-
- Using PascalCase instead of SCREAMING_SNAKE_CASE ([#115](https://github.com/clashperk/clashofclans.js/pull/115))
|
|
43
|
-
- `Client#events` and `EventManager` have been removed in favor of `PollingClient` ([#117](https://github.com/clashperk/clashofclans.js/pull/117), [#127](https://github.com/clashperk/clashofclans.js/pull/127))
|
|
44
|
-
|
|
45
|
-
## 2.8.0 (2022-07-22)
|
|
46
|
-
|
|
47
|
-
### Features
|
|
48
|
-
|
|
49
|
-
- Better Throttler with JS generator function. ([#111](https://github.com/clashperk/clashofclans.js/pull/111))
|
|
50
|
-
- Updated raw data from game files. ([#111](https://github.com/clashperk/clashofclans.js/pull/111))
|
|
51
|
-
- New method Util#parseArmyLink has been added. ([#110](https://github.com/clashperk/clashofclans.js/pull/110))
|
|
52
|
-
|
|
53
|
-
## 2.7.0 (2022-05-22)
|
|
54
|
-
|
|
55
|
-
### Features
|
|
56
|
-
|
|
57
|
-
- Some useful QOL methods have been added. ([#106](https://github.com/clashperk/clashofclans.js/pull/106))
|
|
58
|
-
|
|
59
|
-
## 2.6.1 (2022-02-03)
|
|
60
|
-
|
|
61
|
-
### Bug Fixes
|
|
62
|
-
|
|
63
|
-
- New value and typings `notInWar` added for `ClanWarLeagueGroup#state` ([#101](https://github.com/clashperk/clashofclans.js/pull/101))
|
|
64
|
-
- Throw error if `Util.formatTag` / `Util.parseTag` is called with invalid argument ([#102](https://github.com/clashperk/clashofclans.js/pull/101))
|
|
65
|
-
|
|
66
|
-
## 2.6.0 (2022-01-29)
|
|
67
|
-
|
|
68
|
-
## Features
|
|
69
|
-
|
|
70
|
-
- Replaced Keyv with customizable cache store ([#99](https://github.com/clashperk/clashofclans.js/pull/99))
|
|
71
|
-
- Guide for [Internal Caching](https://clashofclans.js.org/guide/internal-caching)
|
|
72
|
-
|
|
73
|
-
## 2.5.2 (2022-01-23)
|
|
74
|
-
|
|
75
|
-
### Bug Fixes
|
|
76
|
-
|
|
77
|
-
- Fix `ClanWar#attacksPerMembers` property ([#97](https://github.com/clashperk/clashofclans.js/pull/97))
|
|
78
|
-
- Bump `node-fetch` from 2.6.6 to 2.6.7 ([#96](https://github.com/clashperk/clashofclans.js/pull/96))
|
|
79
|
-
|
|
80
|
-
## 2.5.1 (2022-01-11)
|
|
81
|
-
|
|
82
|
-
### Bug Fixes
|
|
83
|
-
|
|
84
|
-
- Typings for `ClanWarLeagueGroup#state` property. ([#94](https://github.com/clashperk/clashofclans.js/pull/94))
|
|
85
|
-
|
|
86
|
-
## 2.5.0 (2021-12-30)
|
|
87
|
-
|
|
88
|
-
### Bug Fixes
|
|
89
|
-
|
|
90
|
-
- Fix caching issue with unnecessary/invalid query params. ([#91](https://github.com/clashperk/clashofclans.js/pull/91))
|
|
91
|
-
- Added necessary methods to `RESTManager` class. ([#92](https://github.com/clashperk/clashofclans.js/pull/92))
|
|
92
|
-
|
|
93
|
-
## 2.4.0 (2021-12-28)
|
|
94
|
-
|
|
95
|
-
### Features
|
|
96
|
-
|
|
97
|
-
- `ClanWar#getClanWarLeagueGroup`, `ClanWar#isCWL` and `ClanWar#isFriendly` are now available. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
98
|
-
- `RESTOptions#rejectIfNotValid` added to perform `res.ok` operations over `RESTManager` methods. [Know more?](https://clashofclans.js.org/guide/access-raw-data#easy-access) ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
99
|
-
- `Icon#fileName` and `Icon#sizes` are now available in `Icon` class. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
100
|
-
- `Badge#fileName` and `Badge#sizes` are now available in `Badge` class. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
101
|
-
|
|
102
|
-
### Deprecations
|
|
103
|
-
|
|
104
|
-
- `ClanWarMember#previousBestOpponentAttack` has been deprecated. Use `ClanWarAttack#previousBestAttack` instead. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
105
|
-
|
|
106
|
-
## 2.3.0 (2021-12-17)
|
|
107
|
-
|
|
108
|
-
### Features
|
|
109
|
-
|
|
110
|
-
- BigInt literals issue fixed. ([#84](https://github.com/clashperk/clashofclans.js/pull/84))
|
|
111
|
-
- Some Utility methods renamed. ([#84](https://github.com/clashperk/clashofclans.js/pull/84))
|
|
112
|
-
- `Util.encodeTag()` to `Util.encodeURI()`
|
|
113
|
-
- `Util.encodeTagToId()` to `Util.encodeTag()`
|
|
114
|
-
- `Util.decodeIdToTag()` to `Util.decodeTag()`
|
|
115
|
-
- Added `dps`, `resourceType`, `trainingTime` and `regenerationTime` to the `Unit` class. ([#85](https://github.com/clashperk/clashofclans.js/pull/85))
|
|
116
|
-
|
|
117
|
-
## 2.2.0 (2021-12-16)
|
|
118
|
-
|
|
119
|
-
### Bug Fixes
|
|
120
|
-
|
|
121
|
-
- Show units as per in-game orders. ([#82](https://github.com/clashperk/clashofclans.js/pull/82)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/95cf3001059fd3ede9262e249814178631660d5b))
|
|
122
|
-
- Season end time utility method. ([#82](https://github.com/clashperk/clashofclans.js/pull/82)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/95cf3001059fd3ede9262e249814178631660d5b))
|
|
123
|
-
- Updated raw files for new Troops. ([#82](https://github.com/clashperk/clashofclans.js/pull/82)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/95cf3001059fd3ede9262e249814178631660d5b))
|
|
124
|
-
|
|
125
|
-
### Features
|
|
126
|
-
|
|
127
|
-
- Added `seasonal`, `boostable` and `isLoaded` property to `Unit` class. ([#82](https://github.com/clashperk/clashofclans.js/pull/82)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/95cf3001059fd3ede9262e249814178631660d5b))
|
|
128
|
-
|
|
129
|
-
## 2.1.0 (2021-12-06)
|
|
130
|
-
|
|
131
|
-
### Bug Fixes
|
|
132
|
-
|
|
133
|
-
- Consistency of `ClanWar.attacksPerMember` property. ([#75](https://github.com/clashperk/clashofclans.js/pull/75)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/6e23d2fe0373f56268ffa55d5ac2807c9a2dc2fc))
|
|
134
|
-
|
|
135
|
-
### Features
|
|
136
|
-
|
|
137
|
-
- More utility methods added to `Util` class. ([#76](https://github.com/clashperk/clashofclans.js/pull/76)) ([ff41115](https://github.com/clashperk/clashofclans.js/commit/ff4111530d6293ef1fc54aa916436130fc30a09c))
|
|
138
|
-
|
|
139
|
-
- `Util.formatTag(tag: string): string`
|
|
140
|
-
- `Util.formatDate(date: string): Date`
|
|
141
|
-
- `Util.isValidTag(tag: string): boolean`
|
|
142
|
-
- `Util.encodeTagToId(tag: string): string` (Removed on 2.3.0)
|
|
143
|
-
- `Util.decodeIdToTag(id: string): string` (Removed on 2.3.0)
|
|
144
|
-
|
|
145
|
-
- Support of async/await for custom events ([#79](https://github.com/clashperk/clashofclans.js/pull/79)) ([ff41115](https://github.com/clashperk/clashofclans.js/commit/a23db3786bcca44b8547c70f27773bdb1216f990))
|
|
146
|
-
|
|
147
|
-
## 2.0.2 (2021-11-30)
|
|
148
|
-
|
|
149
|
-
### Bug Fixes
|
|
150
|
-
|
|
151
|
-
- Return `null` for `RankedPlayer.clan` if they are not in the clan. ([#73](https://github.com/clashperk/clashofclans.js/pull/73)) ([ba82327](https://github.com/clashperk/clashofclans.js/commit/ba8232740f4ca9af2bcc7971aca3574612ef25b6))
|
|
152
|
-
- `OverrideOptions` added for `Client#getClans` and `RESTManager#getClans` ([#73](https://github.com/clashperk/clashofclans.js/pull/73)) ([ba82327](https://github.com/clashperk/clashofclans.js/commit/ba8232740f4ca9af2bcc7971aca3574612ef25b6))
|
|
153
|
-
- `SeasonRankedPlayer` class for legend league ranking. ([#73](https://github.com/clashperk/clashofclans.js/pull/73)) ([ba82327](https://github.com/clashperk/clashofclans.js/commit/ba8232740f4ca9af2bcc7971aca3574612ef25b6))
|
|
154
|
-
|
|
155
|
-
## 2.0.1 (2021-11-27)
|
|
156
|
-
|
|
157
|
-
### Bug Fixes
|
|
158
|
-
|
|
159
|
-
- IP retrieval method and Event Loop ([#70](https://github.com/clashperk/clashofclans.js/issues/70)) ([82b84ba](https://github.com/clashperk/clashofclans.js/commit/82b84ba5d96505c43b75e53aa07f547ef0b77778))
|
|
160
|
-
|
|
161
|
-
## 2.0.0 (2021-11-26)
|
|
162
|
-
|
|
163
|
-
This new version is a complete TypeScript rewrite to convert everything from plain (literal JSON) objects to class (constructor) objects and support a lot more features.
|
|
164
|
-
|
|
165
|
-
### Features
|
|
166
|
-
|
|
167
|
-
- HTTP Request Request Retries ([#26](https://github.com/clashperk/clashofclans.js/issues/26)) ([94585f3](https://github.com/clashperk/clashofclans.js/commit/94585f3a84a7175b2d07872f9eb9e42372b95e12))
|
|
168
|
-
- Event Manager and Custom Events ([#37](https://github.com/clashperk/clashofclans.js/issues/37)) ([5027ae6](https://github.com/clashperk/clashofclans.js/commit/5027ae663a8e07175e17384c7e5706f4a1a7afb4))
|
|
169
|
-
- Email Password Login ([#31](https://github.com/clashperk/clashofclans.js/issues/31)) ([4153cd3](https://github.com/clashperk/clashofclans.js/commit/4153cd37ea0e1c71550b9e892105b84d5a407e23))
|
|
170
|
-
- Queue Throttler and Batch Throttler ([#34](https://github.com/clashperk/clashofclans.js/issues/34)) ([3a8f051](https://github.com/clashperk/clashofclans.js/commit/3a8f051552e93b98f89bc7d524acdecddf242718))
|
|
171
|
-
- Override Request Options ([#36](https://github.com/clashperk/clashofclans.js/issues/36)) ([42d7fdd](https://github.com/clashperk/clashofclans.js/commit/42d7fdd36262cc46f23b731f8cffb9daea19d3b0))
|
|
172
|
-
- Internal Caching Options ([#53](https://github.com/clashperk/clashofclans.js/issues/53)) ([984451d](https://github.com/clashperk/clashofclans.js/commit/30ea3240c11866008d0dae514468c0fdbb34ffd0))
|
|
173
|
-
- Additional Properties for Player Units ([#65](https://github.com/clashperk/clashofclans.js/pull/65)) ([aa1696](https://github.com/clashperk/clashofclans.js/commit/aa1696243d96d4fed0250b4282c60522a6482343))
|