clashofclans.js 3.1.1-dev.fa77235 → 3.1.2-dev.cb50d96
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 +1 -1
- package/dist/client/Client.d.ts +3 -3
- package/dist/client/Client.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/rest/RESTManager.d.ts +2 -2
- package/dist/rest/RESTManager.js +1 -1
- package/dist/rest/RequestHandler.d.ts +2 -2
- package/dist/struct/Clan.d.ts +4 -4
- package/dist/struct/Clan.js +2 -2
- package/dist/struct/ClanMember.d.ts +1 -1
- package/dist/struct/ClanWar.d.ts +1 -1
- package/dist/struct/ClanWarLeagueGroup.d.ts +2 -2
- package/dist/struct/ClanWarLog.d.ts +1 -1
- package/dist/struct/Player.d.ts +5 -5
- package/dist/struct/Player.js +4 -4
- package/dist/struct/PlayerClan.d.ts +1 -1
- package/dist/struct/Ranking.d.ts +4 -4
- package/dist/struct/Ranking.js +3 -3
- package/dist/struct/Unit.d.ts +1 -1
- package/dist/struct/index.d.ts +3 -3
- package/dist/struct/index.js +3 -3
- package/dist/types/lib.d.ts +1 -1
- package/dist/util/Util.js +0 -1
- package/package.json +11 -15
- package/CHANGELOG.md +0 -154
package/README.md
CHANGED
package/dist/client/Client.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import { ClanSearchOptions, SearchOptions, ClientOptions, LoginOptions, OverrideOptions } from '../types';
|
|
4
|
-
import { CWLRounds, ClientEvents } from '../util/Constants';
|
|
5
3
|
import { RESTManager } from '../rest/RESTManager';
|
|
4
|
+
import { ClanSearchOptions, ClientOptions, LoginOptions, OverrideOptions, SearchOptions } from '../types';
|
|
5
|
+
import { CWLRounds, ClientEvents } from '../util/Constants';
|
|
6
6
|
import { Util } from '../util/Util';
|
|
7
|
-
import { Clan, ClanMember, ClanWar, ClanWarLog, Location, Player, RankedClan, RankedPlayer, SeasonRankedPlayer
|
|
7
|
+
import { Clan, ClanMember, ClanWar, ClanWarLeagueGroup, ClanWarLog, GoldPassSeason, Location, Player, RankedClan, RankedPlayer, SeasonRankedPlayer } from '../struct';
|
|
8
8
|
import { CapitalRaidSeason } from '../struct/CapitalRaidSeason';
|
|
9
9
|
interface IClientEvents {
|
|
10
10
|
[ClientEvents.Error]: [error: unknown];
|
package/dist/client/Client.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Client = void 0;
|
|
4
4
|
const node_events_1 = require("node:events");
|
|
5
|
-
const Constants_1 = require("../util/Constants");
|
|
6
5
|
const HTTPError_1 = require("../rest/HTTPError");
|
|
7
6
|
const RESTManager_1 = require("../rest/RESTManager");
|
|
7
|
+
const Constants_1 = require("../util/Constants");
|
|
8
8
|
const Util_1 = require("../util/Util");
|
|
9
9
|
const struct_1 = require("../struct");
|
|
10
10
|
const CapitalRaidSeason_1 = require("../struct/CapitalRaidSeason");
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from './client/Client';
|
|
2
2
|
export * from './client/PollingClient';
|
|
3
|
+
export * from './rest/HTTPError';
|
|
3
4
|
export * from './rest/RESTManager';
|
|
4
5
|
export * from './rest/RequestHandler';
|
|
5
|
-
export * from './rest/HTTPError';
|
|
6
6
|
export * from './rest/Throttler';
|
|
7
|
-
export * from './util/Util';
|
|
8
7
|
export * from './struct';
|
|
9
8
|
export * from './types';
|
|
10
9
|
export * from './util/Constants';
|
|
11
10
|
export * from './util/Store';
|
|
11
|
+
export * from './util/Util';
|
package/dist/index.js
CHANGED
|
@@ -16,12 +16,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./client/Client"), exports);
|
|
18
18
|
__exportStar(require("./client/PollingClient"), exports);
|
|
19
|
+
__exportStar(require("./rest/HTTPError"), exports);
|
|
19
20
|
__exportStar(require("./rest/RESTManager"), exports);
|
|
20
21
|
__exportStar(require("./rest/RequestHandler"), exports);
|
|
21
|
-
__exportStar(require("./rest/HTTPError"), exports);
|
|
22
22
|
__exportStar(require("./rest/Throttler"), exports);
|
|
23
|
-
__exportStar(require("./util/Util"), exports);
|
|
24
23
|
__exportStar(require("./struct"), exports);
|
|
25
24
|
__exportStar(require("./types"), exports);
|
|
26
25
|
__exportStar(require("./util/Constants"), exports);
|
|
27
26
|
__exportStar(require("./util/Store"), exports);
|
|
27
|
+
__exportStar(require("./util/Util"), exports);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import {
|
|
4
|
-
import { APIClan, APIClanList, APIClanMemberList, APICapitalRaidSeasons, APIClanRankingList, APIClanBuilderBaseRankingList, APIClanWar, APIClanWarLeagueGroup, APIClanWarLog, APIGoldPassSeason, APILabelList, APILeague, APILeagueList, APILeagueSeasonList, APILocation, APILocationList, APIPlayer, APIPlayerRankingList, APIPlayerSeasonRankingList, APIPlayerBuilderBaseRankingList, APIVerifyToken, APIWarLeague, APIWarLeagueList, SearchOptions, ClanSearchOptions, RESTOptions, OverrideOptions, LoginOptions, APICapitalLeagueList, APICapitalLeague, APIClanCapitalRankingList, APIBuilderBaseLeagueList, APIBuilderBaseLeague } from '../types';
|
|
3
|
+
import { APIBuilderBaseLeague, APIBuilderBaseLeagueList, APICapitalLeague, APICapitalLeagueList, APICapitalRaidSeasons, APIClan, APIClanBuilderBaseRankingList, APIClanCapitalRankingList, APIClanList, APIClanMemberList, APIClanRankingList, APIClanWar, APIClanWarLeagueGroup, APIClanWarLog, APIGoldPassSeason, APILabelList, APILeague, APILeagueList, APILeagueSeasonList, APILocation, APILocationList, APIPlayer, APIPlayerBuilderBaseRankingList, APIPlayerRankingList, APIPlayerSeasonRankingList, APIVerifyToken, APIWarLeague, APIWarLeagueList, ClanSearchOptions, LoginOptions, OverrideOptions, RESTOptions, SearchOptions } from '../types';
|
|
5
4
|
import { RestEvents } from '../util/Constants';
|
|
5
|
+
import { Util } from '../util/Util';
|
|
6
6
|
import { RequestHandler } from './RequestHandler';
|
|
7
7
|
export interface IRestEvents {
|
|
8
8
|
[RestEvents.Error]: [error: unknown];
|
package/dist/rest/RESTManager.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RESTManager = void 0;
|
|
4
4
|
const node_events_1 = require("node:events");
|
|
5
|
-
const Util_1 = require("../util/Util");
|
|
6
5
|
const Constants_1 = require("../util/Constants");
|
|
6
|
+
const Util_1 = require("../util/Util");
|
|
7
7
|
const RequestHandler_1 = require("./RequestHandler");
|
|
8
8
|
/** Represents a REST Manager of the client. */
|
|
9
9
|
class RESTManager extends node_events_1.EventEmitter {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import {
|
|
3
|
+
import { LoginOptions, RequestHandlerOptions, RequestOptions, Response } from '../types';
|
|
4
4
|
import { IRestEvents } from './RESTManager';
|
|
5
5
|
export interface RequestHandler {
|
|
6
6
|
emit: (<K extends keyof IRestEvents>(event: K, ...args: IRestEvents[K]) => boolean) & (<S extends string | symbol>(event: Exclude<S, keyof IRestEvents>, ...args: any[]) => boolean);
|
|
@@ -27,7 +27,7 @@ export interface RequestHandler {
|
|
|
27
27
|
*/
|
|
28
28
|
rateLimited: string;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type ResponseBody = any;
|
|
31
31
|
/** Represents the class that manages handlers for endpoints. */
|
|
32
32
|
export declare class RequestHandler extends EventEmitter {
|
|
33
33
|
#private;
|
package/dist/struct/Clan.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { APICapitalLeague, APIChatLanguage, APIClan, APILabel, APIWarLeague, OverrideOptions } from '../types';
|
|
2
1
|
import { Client } from '../client/Client';
|
|
3
|
-
import {
|
|
4
|
-
import type { Player } from './Player';
|
|
5
|
-
import { Location } from './Location';
|
|
2
|
+
import { APICapitalLeague, APIChatLanguage, APIClan, APILabel, APIWarLeague, OverrideOptions } from '../types';
|
|
6
3
|
import { Badge } from './Badge';
|
|
7
4
|
import { ClanCapital } from './ClanCapital';
|
|
5
|
+
import { ClanMember } from './ClanMember';
|
|
6
|
+
import { Location } from './Location';
|
|
7
|
+
import type { Player } from './Player';
|
|
8
8
|
/** Represents a Clan. */
|
|
9
9
|
export declare class Clan {
|
|
10
10
|
client: Client;
|
package/dist/struct/Clan.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Clan = void 0;
|
|
4
|
-
const ClanMember_1 = require("./ClanMember");
|
|
5
|
-
const Location_1 = require("./Location");
|
|
6
4
|
const Badge_1 = require("./Badge");
|
|
7
5
|
const ClanCapital_1 = require("./ClanCapital");
|
|
6
|
+
const ClanMember_1 = require("./ClanMember");
|
|
7
|
+
const Location_1 = require("./Location");
|
|
8
8
|
/** Represents a Clan. */
|
|
9
9
|
class Clan {
|
|
10
10
|
constructor(client, data) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { APIClanMember, APIPlayerHouse, OverrideOptions } from '../types';
|
|
2
1
|
import { Client } from '../client/Client';
|
|
2
|
+
import { APIClanMember, APIPlayerHouse, OverrideOptions } from '../types';
|
|
3
3
|
import { League } from './League';
|
|
4
4
|
export declare class ClanMember {
|
|
5
5
|
client: Client;
|
package/dist/struct/ClanWar.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { APIClanWar, APIClanWarAttack, APIClanWarMember, APIWarClan } from '../types';
|
|
2
1
|
import { Client } from '../client/Client';
|
|
2
|
+
import { APIClanWar, APIClanWarAttack, APIClanWarMember, APIWarClan } from '../types';
|
|
3
3
|
import { Badge } from './Badge';
|
|
4
4
|
/** Represents a Clash of Clans War Attack. */
|
|
5
5
|
export declare class ClanWarAttack {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { APIClanWarLeagueClan, APIClanWarLeagueClanMember, APIClanWarLeagueGroup, APIClanWarLeagueRound, OverrideOptions } from '../types';
|
|
2
1
|
import { Client } from '../client/Client';
|
|
2
|
+
import { APIClanWarLeagueClan, APIClanWarLeagueClanMember, APIClanWarLeagueGroup, APIClanWarLeagueRound, OverrideOptions } from '../types';
|
|
3
|
+
import { Badge } from './Badge';
|
|
3
4
|
import { ClanWar } from './ClanWar';
|
|
4
5
|
import { Player } from './Player';
|
|
5
|
-
import { Badge } from './Badge';
|
|
6
6
|
/** Represents a Clan War League member. */
|
|
7
7
|
export declare class ClanWarLeagueClanMember {
|
|
8
8
|
/** The member's name. */
|
package/dist/struct/Player.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { APIPlayer, APIPlayerHouse, OverrideOptions } from '../types';
|
|
2
1
|
import { Client } from '../client/Client';
|
|
3
|
-
import {
|
|
2
|
+
import { APIPlayer, APIPlayerHouse, OverrideOptions } from '../types';
|
|
4
3
|
import { Achievement } from './Achievement';
|
|
5
|
-
import { Hero, Spell, Troop } from './Unit';
|
|
6
|
-
import { PlayerClan } from './PlayerClan';
|
|
7
|
-
import { League } from './League';
|
|
8
4
|
import { Label } from './Label';
|
|
5
|
+
import { League } from './League';
|
|
6
|
+
import { LegendStatistics } from './LegendStatistics';
|
|
7
|
+
import { PlayerClan } from './PlayerClan';
|
|
8
|
+
import { Hero, Spell, Troop } from './Unit';
|
|
9
9
|
/** Represents a Clash of Clans Player. */
|
|
10
10
|
export declare class Player {
|
|
11
11
|
client: Client;
|
package/dist/struct/Player.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Player = void 0;
|
|
4
4
|
const Constants_1 = require("../util/Constants");
|
|
5
|
-
const LegendStatistics_1 = require("./LegendStatistics");
|
|
6
5
|
const Achievement_1 = require("./Achievement");
|
|
7
|
-
const Unit_1 = require("./Unit");
|
|
8
|
-
const PlayerClan_1 = require("./PlayerClan");
|
|
9
|
-
const League_1 = require("./League");
|
|
10
6
|
const Label_1 = require("./Label");
|
|
7
|
+
const League_1 = require("./League");
|
|
8
|
+
const LegendStatistics_1 = require("./LegendStatistics");
|
|
9
|
+
const PlayerClan_1 = require("./PlayerClan");
|
|
10
|
+
const Unit_1 = require("./Unit");
|
|
11
11
|
/** Represents a Clash of Clans Player. */
|
|
12
12
|
class Player {
|
|
13
13
|
constructor(client, data) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OverrideOptions, APIPlayerClan } from '../types';
|
|
2
1
|
import { Client } from '../client/Client';
|
|
2
|
+
import { APIPlayerClan, OverrideOptions } from '../types';
|
|
3
3
|
import { Badge } from './Badge';
|
|
4
4
|
/** Represents a Player's clan. */
|
|
5
5
|
export declare class PlayerClan {
|
package/dist/struct/Ranking.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { APIClanRanking, APIClanBuilderBaseRanking, APIPlayerRanking, APIPlayerBuilderBaseRanking } from '../types';
|
|
2
1
|
import { Client } from '../client/Client';
|
|
3
|
-
import {
|
|
4
|
-
import { Location } from './Location';
|
|
5
|
-
import { League } from './League';
|
|
2
|
+
import { APIClanBuilderBaseRanking, APIClanRanking, APIPlayerBuilderBaseRanking, APIPlayerRanking } from '../types';
|
|
6
3
|
import { Badge } from './Badge';
|
|
4
|
+
import { League } from './League';
|
|
5
|
+
import { Location } from './Location';
|
|
6
|
+
import { PlayerClan } from './PlayerClan';
|
|
7
7
|
/** Represents the Player of seasonal legend league leader-board ranking. */
|
|
8
8
|
export declare class SeasonRankedPlayer {
|
|
9
9
|
/** The player's name. */
|
package/dist/struct/Ranking.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RankedClan = exports.RankedPlayer = exports.SeasonRankedPlayer = void 0;
|
|
4
4
|
const Constants_1 = require("../util/Constants");
|
|
5
|
-
const PlayerClan_1 = require("./PlayerClan");
|
|
6
|
-
const Location_1 = require("./Location");
|
|
7
|
-
const League_1 = require("./League");
|
|
8
5
|
const Badge_1 = require("./Badge");
|
|
6
|
+
const League_1 = require("./League");
|
|
7
|
+
const Location_1 = require("./Location");
|
|
8
|
+
const PlayerClan_1 = require("./PlayerClan");
|
|
9
9
|
/** Represents the Player of seasonal legend league leader-board ranking. */
|
|
10
10
|
class SeasonRankedPlayer {
|
|
11
11
|
constructor(client, data) {
|
package/dist/struct/Unit.d.ts
CHANGED
package/dist/struct/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from './Achievement';
|
|
2
2
|
export * from './Badge';
|
|
3
|
+
export * from './CapitalRaidSeason';
|
|
3
4
|
export * from './Clan';
|
|
5
|
+
export * from './ClanCapital';
|
|
4
6
|
export * from './ClanMember';
|
|
5
7
|
export * from './ClanWar';
|
|
6
|
-
export * from './ClanWarLog';
|
|
7
8
|
export * from './ClanWarLeagueGroup';
|
|
9
|
+
export * from './ClanWarLog';
|
|
8
10
|
export * from './Icon';
|
|
9
11
|
export * from './LegendStatistics';
|
|
10
12
|
export * from './Location';
|
|
@@ -13,5 +15,3 @@ export * from './PlayerClan';
|
|
|
13
15
|
export * from './Ranking';
|
|
14
16
|
export * from './Season';
|
|
15
17
|
export * from './Unit';
|
|
16
|
-
export * from './ClanCapital';
|
|
17
|
-
export * from './CapitalRaidSeason';
|
package/dist/struct/index.js
CHANGED
|
@@ -16,11 +16,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Achievement"), exports);
|
|
18
18
|
__exportStar(require("./Badge"), exports);
|
|
19
|
+
__exportStar(require("./CapitalRaidSeason"), exports);
|
|
19
20
|
__exportStar(require("./Clan"), exports);
|
|
21
|
+
__exportStar(require("./ClanCapital"), exports);
|
|
20
22
|
__exportStar(require("./ClanMember"), exports);
|
|
21
23
|
__exportStar(require("./ClanWar"), exports);
|
|
22
|
-
__exportStar(require("./ClanWarLog"), exports);
|
|
23
24
|
__exportStar(require("./ClanWarLeagueGroup"), exports);
|
|
25
|
+
__exportStar(require("./ClanWarLog"), exports);
|
|
24
26
|
__exportStar(require("./Icon"), exports);
|
|
25
27
|
__exportStar(require("./LegendStatistics"), exports);
|
|
26
28
|
__exportStar(require("./Location"), exports);
|
|
@@ -29,5 +31,3 @@ __exportStar(require("./PlayerClan"), exports);
|
|
|
29
31
|
__exportStar(require("./Ranking"), exports);
|
|
30
32
|
__exportStar(require("./Season"), exports);
|
|
31
33
|
__exportStar(require("./Unit"), exports);
|
|
32
|
-
__exportStar(require("./ClanCapital"), exports);
|
|
33
|
-
__exportStar(require("./CapitalRaidSeason"), exports);
|
package/dist/types/lib.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BatchThrottler, QueueThrottler } from '../rest/Throttler';
|
|
2
2
|
export interface Store<T = any> {
|
|
3
3
|
set: (key: string, value: T, ttl?: number) => boolean | Promise<boolean>;
|
|
4
4
|
get: (key: string) => T | null | Promise<T | null>;
|
package/dist/util/Util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clashofclans.js",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2-dev.cb50d96",
|
|
4
4
|
"description": "JavaScript library for interacting with the Clash of Clans API",
|
|
5
5
|
"author": "SUVAJIT <suvajit.me@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,26 +42,22 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"node-fetch": "^2.6.7",
|
|
46
45
|
"undici": "^5.23.0"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"@types/node": "^18.
|
|
50
|
-
"@
|
|
51
|
-
"@typescript-eslint/
|
|
52
|
-
"@typescript-eslint/parser": "^5.4.0",
|
|
48
|
+
"@types/node": "^18.17.5",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^6.3.0",
|
|
50
|
+
"@typescript-eslint/parser": "^6.3.0",
|
|
53
51
|
"dotenv": "^16.0.2",
|
|
54
|
-
"eslint": "^8.
|
|
55
|
-
"eslint-config-
|
|
56
|
-
"eslint-
|
|
57
|
-
"eslint-plugin-import": "^2.26.0",
|
|
58
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
52
|
+
"eslint": "^8.47.0",
|
|
53
|
+
"eslint-config-prettier": "^9.0.0",
|
|
54
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
59
55
|
"gen-esm-wrapper": "^1.1.3",
|
|
60
|
-
"prettier": "^
|
|
61
|
-
"rimraf": "^
|
|
62
|
-
"typescript": "^
|
|
56
|
+
"prettier": "^3.0.1",
|
|
57
|
+
"rimraf": "^5.0.1",
|
|
58
|
+
"typescript": "^5.1.6"
|
|
63
59
|
},
|
|
64
60
|
"engines": {
|
|
65
|
-
"node": ">=
|
|
61
|
+
"node": ">=16.x"
|
|
66
62
|
}
|
|
67
63
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,154 +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.0.2 (15-01-2023)
|
|
6
|
-
|
|
7
|
-
### Bug Fixes
|
|
8
|
-
|
|
9
|
-
- Conflict with the same name of builder base and home base troops. (#123)
|
|
10
|
-
- Fix the issue with the `Client#getLeagueWar()` method.
|
|
11
|
-
- Typings and documentation for clan capital.
|
|
12
|
-
- Fix the issue with the `Clan#clanCapital` property.
|
|
13
|
-
|
|
14
|
-
### Features
|
|
15
|
-
|
|
16
|
-
- Added `Client#getCapitalRaidSeasons()` method.
|
|
17
|
-
- Added `Client#getCapitalLeagues()` method.
|
|
18
|
-
- Added `Client#getClanCapitalRanks()` method.
|
|
19
|
-
- Added new Super Troops in raw.json file.
|
|
20
|
-
|
|
21
|
-
### Breaking Changes
|
|
22
|
-
|
|
23
|
-
- Using PascalCase instead of SCREAMING_SNAKE_CASE ([#115](https://github.com/clashperk/clashofclans.js/pull/115))
|
|
24
|
-
- `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))
|
|
25
|
-
|
|
26
|
-
## 2.8.0 (2022-07-22)
|
|
27
|
-
|
|
28
|
-
### Features
|
|
29
|
-
|
|
30
|
-
- Better Throttler with JS generator function. ([#111](https://github.com/clashperk/clashofclans.js/pull/111))
|
|
31
|
-
- Updated raw data from game files. ([#111](https://github.com/clashperk/clashofclans.js/pull/111))
|
|
32
|
-
- New method Util#parseArmyLink has been added. ([#110](https://github.com/clashperk/clashofclans.js/pull/110))
|
|
33
|
-
|
|
34
|
-
## 2.7.0 (2022-05-22)
|
|
35
|
-
|
|
36
|
-
### Features
|
|
37
|
-
|
|
38
|
-
- Some useful QOL methods have been added. ([#106](https://github.com/clashperk/clashofclans.js/pull/106))
|
|
39
|
-
|
|
40
|
-
## 2.6.1 (2022-02-03)
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
- New value and typings `notInWar` added for `ClanWarLeagueGroup#state` ([#101](https://github.com/clashperk/clashofclans.js/pull/101))
|
|
45
|
-
- Throw error if `Util.formatTag` / `Util.parseTag` is called with invalid argument ([#102](https://github.com/clashperk/clashofclans.js/pull/101))
|
|
46
|
-
|
|
47
|
-
## 2.6.0 (2022-01-29)
|
|
48
|
-
|
|
49
|
-
## Features
|
|
50
|
-
|
|
51
|
-
- Replaced Keyv with customizable cache store ([#99](https://github.com/clashperk/clashofclans.js/pull/99))
|
|
52
|
-
- Guide for [Internal Caching](https://clashofclans.js.org/guide/internal-caching)
|
|
53
|
-
|
|
54
|
-
## 2.5.2 (2022-01-23)
|
|
55
|
-
|
|
56
|
-
### Bug Fixes
|
|
57
|
-
|
|
58
|
-
- Fix `ClanWar#attacksPerMembers` property ([#97](https://github.com/clashperk/clashofclans.js/pull/97))
|
|
59
|
-
- Bump `node-fetch` from 2.6.6 to 2.6.7 ([#96](https://github.com/clashperk/clashofclans.js/pull/96))
|
|
60
|
-
|
|
61
|
-
## 2.5.1 (2022-01-11)
|
|
62
|
-
|
|
63
|
-
### Bug Fixes
|
|
64
|
-
|
|
65
|
-
- Typings for `ClanWarLeagueGroup#state` property. ([#94](https://github.com/clashperk/clashofclans.js/pull/94))
|
|
66
|
-
|
|
67
|
-
## 2.5.0 (2021-12-30)
|
|
68
|
-
|
|
69
|
-
### Bug Fixes
|
|
70
|
-
|
|
71
|
-
- Fix caching issue with unnecessary/invalid query params. ([#91](https://github.com/clashperk/clashofclans.js/pull/91))
|
|
72
|
-
- Added necessary methods to `RESTManager` class. ([#92](https://github.com/clashperk/clashofclans.js/pull/92))
|
|
73
|
-
|
|
74
|
-
## 2.4.0 (2021-12-28)
|
|
75
|
-
|
|
76
|
-
### Features
|
|
77
|
-
|
|
78
|
-
- `ClanWar#getClanWarLeagueGroup`, `ClanWar#isCWL` and `ClanWar#isFriendly` are now available. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
79
|
-
- `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))
|
|
80
|
-
- `Icon#fileName` and `Icon#sizes` are now available in `Icon` class. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
81
|
-
- `Badge#fileName` and `Badge#sizes` are now available in `Badge` class. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
82
|
-
|
|
83
|
-
### Deprecations
|
|
84
|
-
|
|
85
|
-
- `ClanWarMember#previousBestOpponentAttack` has been deprecated. Use `ClanWarAttack#previousBestAttack` instead. ([#87](https://github.com/clashperk/clashofclans.js/pull/87))
|
|
86
|
-
|
|
87
|
-
## 2.3.0 (2021-12-17)
|
|
88
|
-
|
|
89
|
-
### Features
|
|
90
|
-
|
|
91
|
-
- BigInt literals issue fixed. ([#84](https://github.com/clashperk/clashofclans.js/pull/84))
|
|
92
|
-
- Some Utility methods renamed. ([#84](https://github.com/clashperk/clashofclans.js/pull/84))
|
|
93
|
-
- `Util.encodeTag()` to `Util.encodeURI()`
|
|
94
|
-
- `Util.encodeTagToId()` to `Util.encodeTag()`
|
|
95
|
-
- `Util.decodeIdToTag()` to `Util.decodeTag()`
|
|
96
|
-
- Added `dps`, `resourceType`, `trainingTime` and `regenerationTime` to the `Unit` class. ([#85](https://github.com/clashperk/clashofclans.js/pull/85))
|
|
97
|
-
|
|
98
|
-
## 2.2.0 (2021-12-16)
|
|
99
|
-
|
|
100
|
-
### Bug Fixes
|
|
101
|
-
|
|
102
|
-
- 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))
|
|
103
|
-
- Season end time utility method. ([#82](https://github.com/clashperk/clashofclans.js/pull/82)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/95cf3001059fd3ede9262e249814178631660d5b))
|
|
104
|
-
- Updated raw files for new Troops. ([#82](https://github.com/clashperk/clashofclans.js/pull/82)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/95cf3001059fd3ede9262e249814178631660d5b))
|
|
105
|
-
|
|
106
|
-
### Features
|
|
107
|
-
|
|
108
|
-
- 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))
|
|
109
|
-
|
|
110
|
-
## 2.1.0 (2021-12-06)
|
|
111
|
-
|
|
112
|
-
### Bug Fixes
|
|
113
|
-
|
|
114
|
-
- Consistency of `ClanWar.attacksPerMember` property. ([#75](https://github.com/clashperk/clashofclans.js/pull/75)) ([6e23d2f](https://github.com/clashperk/clashofclans.js/commit/6e23d2fe0373f56268ffa55d5ac2807c9a2dc2fc))
|
|
115
|
-
|
|
116
|
-
### Features
|
|
117
|
-
|
|
118
|
-
- 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))
|
|
119
|
-
|
|
120
|
-
- `Util.formatTag(tag: string): string`
|
|
121
|
-
- `Util.formatDate(date: string): Date`
|
|
122
|
-
- `Util.isValidTag(tag: string): boolean`
|
|
123
|
-
- `Util.encodeTagToId(tag: string): string` (Removed on 2.3.0)
|
|
124
|
-
- `Util.decodeIdToTag(id: string): string` (Removed on 2.3.0)
|
|
125
|
-
|
|
126
|
-
- 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))
|
|
127
|
-
|
|
128
|
-
## 2.0.2 (2021-11-30)
|
|
129
|
-
|
|
130
|
-
### Bug Fixes
|
|
131
|
-
|
|
132
|
-
- 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))
|
|
133
|
-
- `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))
|
|
134
|
-
- `SeasonRankedPlayer` class for legend league ranking. ([#73](https://github.com/clashperk/clashofclans.js/pull/73)) ([ba82327](https://github.com/clashperk/clashofclans.js/commit/ba8232740f4ca9af2bcc7971aca3574612ef25b6))
|
|
135
|
-
|
|
136
|
-
## 2.0.1 (2021-11-27)
|
|
137
|
-
|
|
138
|
-
### Bug Fixes
|
|
139
|
-
|
|
140
|
-
- IP retrieval method and Event Loop ([#70](https://github.com/clashperk/clashofclans.js/issues/70)) ([82b84ba](https://github.com/clashperk/clashofclans.js/commit/82b84ba5d96505c43b75e53aa07f547ef0b77778))
|
|
141
|
-
|
|
142
|
-
## 2.0.0 (2021-11-26)
|
|
143
|
-
|
|
144
|
-
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.
|
|
145
|
-
|
|
146
|
-
### Features
|
|
147
|
-
|
|
148
|
-
- HTTP Request Request Retries ([#26](https://github.com/clashperk/clashofclans.js/issues/26)) ([94585f3](https://github.com/clashperk/clashofclans.js/commit/94585f3a84a7175b2d07872f9eb9e42372b95e12))
|
|
149
|
-
- Event Manager and Custom Events ([#37](https://github.com/clashperk/clashofclans.js/issues/37)) ([5027ae6](https://github.com/clashperk/clashofclans.js/commit/5027ae663a8e07175e17384c7e5706f4a1a7afb4))
|
|
150
|
-
- Email Password Login ([#31](https://github.com/clashperk/clashofclans.js/issues/31)) ([4153cd3](https://github.com/clashperk/clashofclans.js/commit/4153cd37ea0e1c71550b9e892105b84d5a407e23))
|
|
151
|
-
- Queue Throttler and Batch Throttler ([#34](https://github.com/clashperk/clashofclans.js/issues/34)) ([3a8f051](https://github.com/clashperk/clashofclans.js/commit/3a8f051552e93b98f89bc7d524acdecddf242718))
|
|
152
|
-
- Override Request Options ([#36](https://github.com/clashperk/clashofclans.js/issues/36)) ([42d7fdd](https://github.com/clashperk/clashofclans.js/commit/42d7fdd36262cc46f23b731f8cffb9daea19d3b0))
|
|
153
|
-
- Internal Caching Options ([#53](https://github.com/clashperk/clashofclans.js/issues/53)) ([984451d](https://github.com/clashperk/clashofclans.js/commit/30ea3240c11866008d0dae514468c0fdbb34ffd0))
|
|
154
|
-
- Additional Properties for Player Units ([#65](https://github.com/clashperk/clashofclans.js/pull/65)) ([aa1696](https://github.com/clashperk/clashofclans.js/commit/aa1696243d96d4fed0250b4282c60522a6482343))
|