clashofclans.js 3.6.2-dev.367d031 → 3.6.2-dev.7be8e4e
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/rest/RESTManager.d.ts +1 -6
- package/dist/rest/RESTManager.js +0 -9
- package/dist/struct/Unit.js +0 -2
- package/dist/types/api.d.ts +0 -36
- package/dist/util/Constants.d.ts +32 -2
- package/dist/util/raw.json +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import {
|
|
3
|
+
import { APIBuilderBaseLeague, APIBuilderBaseLeagueList, APICapitalLeague, APICapitalLeagueList, APICapitalRaidSeasons, APIClan, APIClanBuilderBaseRankingList, APIClanCapitalRankingList, APIClanList, APIClanMemberList, APIClanRankingList, APIClanWar, APIClanWarLeagueGroup, APIClanWarLogList, APIGoldPassSeason, APILabelList, APILeagueSeasonList, APILeagueTier, APILeagueTierList, 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';
|
|
@@ -72,11 +72,6 @@ export declare class RESTManager extends EventEmitter {
|
|
|
72
72
|
getPlayer(playerTag: string, options?: OverrideOptions): Promise<import("../types").Result<APIPlayer>>;
|
|
73
73
|
/** Verify Player API token that can be found from the Game settings. */
|
|
74
74
|
verifyPlayerToken(playerTag: string, token: string, options?: OverrideOptions): Promise<import("../types").Result<APIVerifyToken>>;
|
|
75
|
-
getLeagueHistory(playerTag: string, options?: OverrideOptions): Promise<import("../types").Result<APILeagueSeasonResultList>>;
|
|
76
|
-
getBattleLog(playerTag: string, options?: OverrideOptions): Promise<import("../types").Result<APIBattleLogEntryList>>;
|
|
77
|
-
getLeagueGroup(leagueGroupTag: string, seasonId: string, options?: OverrideOptions & {
|
|
78
|
-
playerTag?: string;
|
|
79
|
-
}): Promise<import("../types").Result<APILeagueGroupList>>;
|
|
80
75
|
/** Get a list of League Tiers. */
|
|
81
76
|
getLeagueTiers(options?: SearchOptions): Promise<import("../types").Result<APILeagueTierList>>;
|
|
82
77
|
/** Get a League tier info. */
|
package/dist/rest/RESTManager.js
CHANGED
|
@@ -81,15 +81,6 @@ class RESTManager extends node_events_1.EventEmitter {
|
|
|
81
81
|
...options
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
getLeagueHistory(playerTag, options) {
|
|
85
|
-
return this.requestHandler.request(`/players/${Util_1.Util.encodeURI(playerTag)}/leaguehistory`, options);
|
|
86
|
-
}
|
|
87
|
-
getBattleLog(playerTag, options) {
|
|
88
|
-
return this.requestHandler.request(`/players/${Util_1.Util.encodeURI(playerTag)}/battlelog`, options);
|
|
89
|
-
}
|
|
90
|
-
getLeagueGroup(leagueGroupTag, seasonId, options) {
|
|
91
|
-
return this.requestHandler.request(`/leaguegroup/${leagueGroupTag}/${seasonId}`, options);
|
|
92
|
-
}
|
|
93
84
|
/** Get a list of League Tiers. */
|
|
94
85
|
getLeagueTiers(options) {
|
|
95
86
|
const query = Util_1.Util.queryString(options);
|
package/dist/struct/Unit.js
CHANGED
|
@@ -6,8 +6,6 @@ const Constants_1 = require("../util/Constants");
|
|
|
6
6
|
class Unit {
|
|
7
7
|
// #endregion static
|
|
8
8
|
constructor(data, unit) {
|
|
9
|
-
/** Training time of this unit. */
|
|
10
|
-
this.trainingTime = 0;
|
|
11
9
|
this.name = unit.name;
|
|
12
10
|
this.level = unit.level;
|
|
13
11
|
this.maxLevel = unit.maxLevel;
|
package/dist/types/api.d.ts
CHANGED
|
@@ -317,42 +317,6 @@ export interface APIVerifyToken {
|
|
|
317
317
|
token: string;
|
|
318
318
|
status: 'ok' | 'invalid';
|
|
319
319
|
}
|
|
320
|
-
export interface APIBattleLogEntryList {
|
|
321
|
-
items: APIBattleLogEntry[];
|
|
322
|
-
}
|
|
323
|
-
export interface APILootEntry {
|
|
324
|
-
name: string;
|
|
325
|
-
amount: number;
|
|
326
|
-
}
|
|
327
|
-
export interface APIBattleLogEntry {
|
|
328
|
-
battleType: 'legend' | 'homeVillage' | 'ranked';
|
|
329
|
-
attack: boolean;
|
|
330
|
-
armyShareCode: string;
|
|
331
|
-
opponentPlayerTag: string;
|
|
332
|
-
stars: number;
|
|
333
|
-
destructionPercentage: number;
|
|
334
|
-
lootedResources: APILootEntry[];
|
|
335
|
-
extraLootedResources: APILootEntry[];
|
|
336
|
-
availableLoot: APILootEntry[];
|
|
337
|
-
}
|
|
338
|
-
export interface APILeagueSeasonResult {
|
|
339
|
-
leagueSeasonId: number;
|
|
340
|
-
leagueTrophies: number;
|
|
341
|
-
leagueTierId: number;
|
|
342
|
-
placement: number;
|
|
343
|
-
attackWins: number;
|
|
344
|
-
attackLosses: number;
|
|
345
|
-
attackStars: number;
|
|
346
|
-
defenseWins: number;
|
|
347
|
-
defenseLosses: number;
|
|
348
|
-
defenseStars: number;
|
|
349
|
-
maxBattles: number;
|
|
350
|
-
}
|
|
351
|
-
export interface APILeagueSeasonResultList {
|
|
352
|
-
items: APILeagueSeasonResult[];
|
|
353
|
-
}
|
|
354
|
-
export interface APILeagueGroupList {
|
|
355
|
-
}
|
|
356
320
|
/** /locations */
|
|
357
321
|
export interface APILocationList {
|
|
358
322
|
items: APILocation[];
|
package/dist/util/Constants.d.ts
CHANGED
|
@@ -70,6 +70,37 @@ export declare const RawData: {
|
|
|
70
70
|
building: string;
|
|
71
71
|
buildingLevel: number;
|
|
72
72
|
};
|
|
73
|
+
trainingTime: number;
|
|
74
|
+
regenerationTimes: never[];
|
|
75
|
+
dps: number[];
|
|
76
|
+
upgrade: {
|
|
77
|
+
cost: number[];
|
|
78
|
+
time: number[];
|
|
79
|
+
resource: string;
|
|
80
|
+
resources: never[];
|
|
81
|
+
};
|
|
82
|
+
allowedCharacters: never[];
|
|
83
|
+
minLevel: number;
|
|
84
|
+
seasonal: boolean;
|
|
85
|
+
levels: number[];
|
|
86
|
+
resourceType?: undefined;
|
|
87
|
+
} | {
|
|
88
|
+
tid: string;
|
|
89
|
+
id: number;
|
|
90
|
+
name: string;
|
|
91
|
+
housingSpace: number;
|
|
92
|
+
village: string;
|
|
93
|
+
category: string;
|
|
94
|
+
subCategory: string;
|
|
95
|
+
unlock: {
|
|
96
|
+
hall: number;
|
|
97
|
+
cost: number;
|
|
98
|
+
time: number;
|
|
99
|
+
resource: string;
|
|
100
|
+
building: string;
|
|
101
|
+
buildingLevel: number;
|
|
102
|
+
};
|
|
103
|
+
trainingTime: string;
|
|
73
104
|
regenerationTimes: never[];
|
|
74
105
|
dps: number[];
|
|
75
106
|
upgrade: {
|
|
@@ -83,7 +114,6 @@ export declare const RawData: {
|
|
|
83
114
|
seasonal: boolean;
|
|
84
115
|
levels: number[];
|
|
85
116
|
resourceType?: undefined;
|
|
86
|
-
trainingTime?: undefined;
|
|
87
117
|
} | {
|
|
88
118
|
tid: string;
|
|
89
119
|
id: number;
|
|
@@ -102,7 +132,7 @@ export declare const RawData: {
|
|
|
102
132
|
};
|
|
103
133
|
resourceType: string;
|
|
104
134
|
trainingTime: number;
|
|
105
|
-
regenerationTimes:
|
|
135
|
+
regenerationTimes: number[];
|
|
106
136
|
dps: number[];
|
|
107
137
|
upgrade: {
|
|
108
138
|
cost: number[];
|