hive-bedrock-api 4.2.0 → 4.4.0
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 +5 -25
- package/lib/HiveAPI.d.ts +14 -46
- package/lib/HiveAPI.d.ts.map +1 -1
- package/lib/HiveAPI.js +87 -85
- package/lib/HiveAPI.js.map +1 -1
- package/package.json +33 -34
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ const { data, error, meta } = await api.getPlayer("player");
|
|
|
40
40
|
const { data, error, meta } = await api.getPlayerSearch("prefix");
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
### Fetch All-Time/Monthly Player Statistics
|
|
43
|
+
### Fetch All-Time/Monthly/Seasonal Player Statistics
|
|
44
44
|
|
|
45
45
|
```ts
|
|
46
46
|
import { Timeframe, Game } from "hive-bedrock-data";
|
|
@@ -49,18 +49,8 @@ import { Timeframe, Game } from "hive-bedrock-data";
|
|
|
49
49
|
const { data, error, meta } = await api.getStatistics("player", Timeframe.AllTime);
|
|
50
50
|
// Returns all monthly games
|
|
51
51
|
const { data, error, meta } = await api.getStatistics("player", Timeframe.Monthly);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const { data, error, meta } = await api.getStatistics("player", Timeframe.AllTime, { game: Game.BedWars });
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Fetch Seasonal Player Statistics
|
|
58
|
-
|
|
59
|
-
```ts
|
|
60
|
-
import { Game } from "hive-bedrock-data";
|
|
61
|
-
|
|
62
|
-
// Returns seasonal statistics for a game
|
|
63
|
-
const { data, error, meta } = await api.getSeasonalStatistics("player", Game.BedWars, 1);
|
|
52
|
+
// Returns seasonal game
|
|
53
|
+
const { data, error, meta } = await api.getStatistics("player", Timeframe.Seasonal);
|
|
64
54
|
```
|
|
65
55
|
|
|
66
56
|
### Fetch All-Time/Monthly Leaderboard
|
|
@@ -72,18 +62,8 @@ import { Timeframe, Game } from "hive-bedrock-data";
|
|
|
72
62
|
const { data, error, meta } = await api.getLeaderboard(Timeframe.AllTime, Game.SkyWars);
|
|
73
63
|
// Returns monthly leaderboard
|
|
74
64
|
const { data, error, meta } = await api.getLeaderboard(Timeframe.Monthly, Game.SkyWars);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const { data, error, meta } = await api.getLeaderboard(Timeframe.Monthly, { month: 11, year: 2024 });
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Fetch Seasonal Leaderboard
|
|
81
|
-
|
|
82
|
-
```ts
|
|
83
|
-
import { Game } from "hive-bedrock-data";
|
|
84
|
-
|
|
85
|
-
// Returns seasonal leaderboard for a game
|
|
86
|
-
const { data, error, meta } = await api.getSeasonalLeaderboard(Game.BedWars, 1);
|
|
65
|
+
// Returns seasonal leaderboard
|
|
66
|
+
const { data, error, meta } = await api.getLeaderboard(Timeframe.Seasonal, Game.BedWars);
|
|
87
67
|
```
|
|
88
68
|
|
|
89
69
|
### Fetch Global Statistics
|
package/lib/HiveAPI.d.ts
CHANGED
|
@@ -12,6 +12,9 @@ interface Options {
|
|
|
12
12
|
apiBaseEndpoint?: string;
|
|
13
13
|
requestInit?: RequestInit;
|
|
14
14
|
}
|
|
15
|
+
interface MethodOptions {
|
|
16
|
+
requestInit?: RequestInit;
|
|
17
|
+
}
|
|
15
18
|
export default class HiveAPI {
|
|
16
19
|
options: Options;
|
|
17
20
|
constructor(options?: Options);
|
|
@@ -21,13 +24,13 @@ export default class HiveAPI {
|
|
|
21
24
|
* @param identifier Username or UUID of the player
|
|
22
25
|
* @returns The player information
|
|
23
26
|
*/
|
|
24
|
-
getPlayer(identifier: string): Promise<MethodResponse<ProcessedPlayerResponse>>;
|
|
27
|
+
getPlayer(identifier: string, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedPlayerResponse>>;
|
|
25
28
|
/**
|
|
26
29
|
* `/player/search/{prefix}` Gets a list of players that match the prefix
|
|
27
30
|
* @param prefix The prefix to search for (must be at least 4 characters long)
|
|
28
31
|
* @returns A list of players that match the prefix
|
|
29
32
|
*/
|
|
30
|
-
getPlayerSearch(prefix: string): Promise<MethodResponse<ProcessedPlayerSearchResponse>>;
|
|
33
|
+
getPlayerSearch(prefix: string, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedPlayerSearchResponse>>;
|
|
31
34
|
/**
|
|
32
35
|
* Gets statistics for a player
|
|
33
36
|
* @param identifier Username or UUID of the player
|
|
@@ -36,76 +39,41 @@ export default class HiveAPI {
|
|
|
36
39
|
* @returns The player statistics
|
|
37
40
|
*/
|
|
38
41
|
getStatistics(identifier: string, timeframe: Timeframe.AllTime): Promise<MethodResponse<ProcessedAllGamesResponse>>;
|
|
39
|
-
getStatistics
|
|
40
|
-
|
|
41
|
-
}): Promise<MethodResponse<ProcessedGame<Timeframe.AllTime, false>[G]>>;
|
|
42
|
-
getStatistics(identifier: string, timeframe: Timeframe.Monthly, options?: {
|
|
43
|
-
month?: number;
|
|
44
|
-
year?: number;
|
|
45
|
-
}): Promise<MethodResponse<ProcessedMonthlyGamesResponse>>;
|
|
46
|
-
getStatistics<G extends Game>(identifier: string, timeframe: Timeframe.Monthly, options: {
|
|
47
|
-
game: G;
|
|
48
|
-
month?: number;
|
|
49
|
-
year?: number;
|
|
50
|
-
}): Promise<MethodResponse<ProcessedGame<Timeframe.Monthly, false>[G]>>;
|
|
51
|
-
getStatistics<G extends Game>(identifier: string, timeframe: Timeframe.Seasonal, options: {
|
|
52
|
-
game: G;
|
|
53
|
-
season: number;
|
|
54
|
-
}): Promise<MethodResponse<ProcessedMonthlyGamesResponse>>;
|
|
42
|
+
getStatistics(identifier: string, timeframe: Timeframe.Monthly, month?: number, year?: number, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedMonthlyGamesResponse>>;
|
|
43
|
+
getStatistics<G extends Game>(identifier: string, timeframe: Timeframe.Seasonal, game: G, season?: number, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedMonthlyGamesResponse["statistics"][G]>>;
|
|
55
44
|
private _getStatisticsAllTime;
|
|
56
45
|
private _getStatisticsMonthly;
|
|
57
46
|
private _getStatisticsSeasonal;
|
|
58
|
-
getAvailableMonthlyLeaderboards<G extends Game>(game: G): Promise<MethodResponse<AvailableLeaderboardResponse>>;
|
|
59
|
-
/**
|
|
60
|
-
* `/game/season/player/{game}/{player}/{season}` Gets seasonal statistics for a player
|
|
61
|
-
* @param identifier Username or UUID of the player
|
|
62
|
-
* @param game The game to get the statistics for
|
|
63
|
-
* @param season The season to get the statistics for
|
|
64
|
-
* @returns The player's seasonal statistics
|
|
65
|
-
*/
|
|
66
|
-
getSeasonalStatistics<G extends Game>(identifier: string, game: G, season?: number): Promise<MethodResponse<ProcessedMonthlyGamesResponse["statistics"][G] | null>>;
|
|
47
|
+
getAvailableMonthlyLeaderboards<G extends Game>(game: G, options?: Partial<MethodOptions>): Promise<MethodResponse<AvailableLeaderboardResponse>>;
|
|
67
48
|
/**
|
|
68
49
|
* `/game/all/{game}` Gets statistics for a game
|
|
69
50
|
* @param timeframe The timeframe to get the statistics for
|
|
70
51
|
* @param game The game to get the statistics for
|
|
71
52
|
* @param options Additional options including specific month and year
|
|
72
53
|
*/
|
|
73
|
-
getLeaderboard<G extends Game>(timeframe: Timeframe.AllTime, game: G): Promise<MethodResponse<ProcessedGame<Timeframe.AllTime, true>[G][] | null>>;
|
|
74
|
-
getLeaderboard<G extends Game>(timeframe: Timeframe.Monthly, game: G): Promise<MethodResponse<ProcessedGame<Timeframe.Monthly, true>[G][] | null>>;
|
|
75
|
-
getLeaderboard<G extends Game>(timeframe: Timeframe.
|
|
76
|
-
month?: number;
|
|
77
|
-
year?: number;
|
|
78
|
-
}): Promise<MethodResponse<ProcessedGame<Timeframe.Monthly, true>[G][] | null>>;
|
|
79
|
-
getLeaderboard<G extends Game>(timeframe: Timeframe.Seasonal, game: G, options: {
|
|
80
|
-
season: number;
|
|
81
|
-
}): Promise<MethodResponse<ProcessedGame<Timeframe.Seasonal, true>[G][] | null>>;
|
|
54
|
+
getLeaderboard<G extends Game>(timeframe: Timeframe.AllTime, game: G, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedGame<Timeframe.AllTime, true>[G][] | null>>;
|
|
55
|
+
getLeaderboard<G extends Game>(timeframe: Timeframe.Monthly, game: G, month?: number, year?: number, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedGame<Timeframe.Monthly, true>[G][] | null>>;
|
|
56
|
+
getLeaderboard<G extends Game>(timeframe: Timeframe.Seasonal, game: G, season?: number, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedGame<Timeframe.Seasonal, true>[G][] | null>>;
|
|
82
57
|
private _getLeaderboardAllTime;
|
|
83
58
|
private _getLeaderboardMonthly;
|
|
84
59
|
private _getLeaderboardSeasonal;
|
|
85
|
-
/**
|
|
86
|
-
* `/game/season/{game}/{season}` Gets seasonal statistics for a game
|
|
87
|
-
* @param game The game to get the statistics for
|
|
88
|
-
* @param season The season to get the statistics for
|
|
89
|
-
* @returns The seasonal statistics for the game
|
|
90
|
-
*/
|
|
91
|
-
getSeasonalLeaderboard<G extends Game>(game: G, season?: number): Promise<MethodResponse<ProcessedGame<Timeframe.Monthly, true>[G][]>>;
|
|
92
60
|
/**
|
|
93
61
|
* `/global/statistics` Gets global statistics
|
|
94
62
|
* @returns The global statistics
|
|
95
63
|
*/
|
|
96
|
-
getGlobalStatistics(): Promise<MethodResponse<ProcessedGlobalStatisticsResponse>>;
|
|
64
|
+
getGlobalStatistics(options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedGlobalStatisticsResponse>>;
|
|
97
65
|
/**
|
|
98
66
|
* `/game/map/{game}` Gets information about the maps in a game
|
|
99
67
|
* @param game The game to get the maps for (fails for games without maps)
|
|
100
68
|
* @returns A list of maps in the game
|
|
101
69
|
*/
|
|
102
|
-
getGameMaps(game: Game): Promise<MethodResponse<ProcessedMapResponse>>;
|
|
70
|
+
getGameMaps(game: Game, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedMapResponse>>;
|
|
103
71
|
/**
|
|
104
72
|
* `/game/meta/{game}` Gets metadata about a game
|
|
105
73
|
* @param game The game to get the metadata for
|
|
106
74
|
* @returns The metadata for the game
|
|
107
75
|
*/
|
|
108
|
-
getGameMetadata(game: Game): Promise<MethodResponse<ProcessedGameMetadata>>;
|
|
76
|
+
getGameMetadata(game: Game, options?: Partial<MethodOptions>): Promise<MethodResponse<ProcessedGameMetadata>>;
|
|
109
77
|
}
|
|
110
78
|
export {};
|
|
111
79
|
//# sourceMappingURL=HiveAPI.d.ts.map
|
package/lib/HiveAPI.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiveAPI.d.ts","sourceRoot":"","sources":["../src/HiveAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAS,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAA0B,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAA4B,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAe,4BAA4B,EAAE,yBAAyB,EAAE,aAAa,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1J,UAAU,OAAO;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,OAAO,OAAO;IACL,OAAO,EAAE,OAAO;gBAAhB,OAAO,GAAE,OAAY;YAK1B,SAAS;
|
|
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AAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACjE,cAAc,CAAC,CAAC,SAAS,IAAI,EACtC,SAAS,EAAE,SAAS,CAAC,QAAQ,EAC7B,IAAI,EAAE,CAAC,EACP,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GACjC,OAAO,CAAC,cAAc,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;YAiCjE,sBAAsB;YAUtB,sBAAsB;YAatB,uBAAuB;IAYrC;;;OAGG;IACU,mBAAmB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,iCAAiC,CAAC,CAAC;IAK9H;;;;OAIG;IACU,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC;IAMrH;;;;OAIG;IACU,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;CAM7H"}
|
package/lib/HiveAPI.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { API_BASE_ENDPOINT, Games, Timeframe } from "hive-bedrock-data";
|
|
1
|
+
import { API_BASE_ENDPOINT, Game, Games, Timeframe } from "hive-bedrock-data";
|
|
2
2
|
import processPlayerInfo from "./processors/player.js";
|
|
3
3
|
import processPlayerSearch from "./processors/player_search.js";
|
|
4
4
|
import { processGame } from "./processors/game.js";
|
|
@@ -9,16 +9,18 @@ export default class HiveAPI {
|
|
|
9
9
|
this.options = options;
|
|
10
10
|
this.options.apiBaseEndpoint = this.options.apiBaseEndpoint ?? API_BASE_ENDPOINT;
|
|
11
11
|
}
|
|
12
|
-
async _fetchAPI(endpoint) {
|
|
12
|
+
async _fetchAPI(endpoint, requestInit) {
|
|
13
13
|
const url = this.options.apiBaseEndpoint + endpoint;
|
|
14
14
|
try {
|
|
15
15
|
const start = performance.now();
|
|
16
16
|
const request = await fetch(url, {
|
|
17
17
|
...this.options.requestInit,
|
|
18
|
+
...requestInit,
|
|
18
19
|
headers: {
|
|
19
20
|
"X-Hive-Resolve-Stat-Track": (this.options.resolveDynamicTitles ?? true).toString(),
|
|
20
21
|
"X-Hive-Leaderboard-Source": this.options.useModernLeaderboardSource ? "modern" : "legacy",
|
|
21
22
|
...this.options.requestInit?.headers,
|
|
23
|
+
...requestInit?.headers,
|
|
22
24
|
},
|
|
23
25
|
});
|
|
24
26
|
if (!request.ok)
|
|
@@ -44,8 +46,8 @@ export default class HiveAPI {
|
|
|
44
46
|
* @param identifier Username or UUID of the player
|
|
45
47
|
* @returns The player information
|
|
46
48
|
*/
|
|
47
|
-
async getPlayer(identifier) {
|
|
48
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/all/main/${identifier}
|
|
49
|
+
async getPlayer(identifier, options) {
|
|
50
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/all/main/${identifier}`, options?.requestInit);
|
|
49
51
|
if (error)
|
|
50
52
|
return { data: null, error, meta };
|
|
51
53
|
const data = processPlayerInfo(response);
|
|
@@ -58,8 +60,8 @@ export default class HiveAPI {
|
|
|
58
60
|
* @param prefix The prefix to search for (must be at least 4 characters long)
|
|
59
61
|
* @returns A list of players that match the prefix
|
|
60
62
|
*/
|
|
61
|
-
async getPlayerSearch(prefix) {
|
|
62
|
-
const { data: response, error, meta } = await this._fetchAPI(`/player/search/${prefix}
|
|
63
|
+
async getPlayerSearch(prefix, options) {
|
|
64
|
+
const { data: response, error, meta } = await this._fetchAPI(`/player/search/${prefix}`, options?.requestInit);
|
|
63
65
|
if (error)
|
|
64
66
|
return { data: null, error, meta };
|
|
65
67
|
const data = processPlayerSearch(response);
|
|
@@ -67,32 +69,45 @@ export default class HiveAPI {
|
|
|
67
69
|
return { data: null, error: { status: 500, message: "Failed to process player search data" }, meta };
|
|
68
70
|
return { data, error: null, meta };
|
|
69
71
|
}
|
|
70
|
-
async getStatistics(identifier, timeframe,
|
|
72
|
+
async getStatistics(identifier, timeframe, ...args) {
|
|
71
73
|
if (timeframe === Timeframe.AllTime) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
throw new Error(`Statistics are not available for the game: ${options.game}`);
|
|
75
|
-
return this._getStatisticsAllTime(identifier, options.game);
|
|
76
|
-
}
|
|
77
|
-
return this._getStatisticsAllTime(identifier);
|
|
74
|
+
let options = args[0];
|
|
75
|
+
return this._getStatisticsAllTime(identifier, options);
|
|
78
76
|
}
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
if (timeframe === Timeframe.Seasonal) {
|
|
78
|
+
let game = args[0];
|
|
79
|
+
let season = args[1];
|
|
80
|
+
let options = args[2];
|
|
81
|
+
if (!game)
|
|
81
82
|
throw new Error("Game must be specified for seasonal statistics");
|
|
82
|
-
if (
|
|
83
|
-
throw new Error(`
|
|
84
|
-
|
|
83
|
+
if (Object.values(Game).indexOf(game) === -1)
|
|
84
|
+
throw new Error(`Invalid game specified: ${game}`);
|
|
85
|
+
if (!Games[game].statistics)
|
|
86
|
+
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
87
|
+
if (season !== undefined && (isNaN(season) || season < 1))
|
|
88
|
+
throw new Error("Season must be a positive integer");
|
|
89
|
+
if (!season)
|
|
90
|
+
season = 1;
|
|
91
|
+
return this._getStatisticsSeasonal(identifier, game, season, options);
|
|
85
92
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
let month = args[0];
|
|
94
|
+
let year = args[1];
|
|
95
|
+
let options = args[2];
|
|
96
|
+
if (month !== undefined && (isNaN(month) || month < 1 || month > 12))
|
|
97
|
+
throw new Error("Month must be a number between 1 and 12");
|
|
98
|
+
if (year !== undefined && (isNaN(year) || year < 1970))
|
|
99
|
+
throw new Error("Year must be a number greater than or equal to 1970");
|
|
100
|
+
if (!month)
|
|
101
|
+
month = new Date().getMonth() + 1;
|
|
102
|
+
if (!year)
|
|
103
|
+
year = new Date().getFullYear();
|
|
104
|
+
return this._getStatisticsMonthly(identifier, month, year, options);
|
|
105
|
+
}
|
|
106
|
+
// /game/all/{game}/{player}
|
|
107
|
+
async _getStatisticsAllTime(identifier, options) {
|
|
108
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/all/all/${identifier}`, options?.requestInit);
|
|
92
109
|
if (error)
|
|
93
110
|
return { data: null, error, meta };
|
|
94
|
-
if (game)
|
|
95
|
-
return { data: processGame(game, Timeframe.AllTime, false, response), error: null, meta };
|
|
96
111
|
let data = Object.fromEntries(Object.entries(response).map(([id, res]) => [id, id === "main" ? null : (processGame(id, Timeframe.AllTime, false, res) ?? null)]));
|
|
97
112
|
delete data.main;
|
|
98
113
|
return {
|
|
@@ -104,14 +119,11 @@ export default class HiveAPI {
|
|
|
104
119
|
meta,
|
|
105
120
|
};
|
|
106
121
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const { data: response, error, meta, } = await this._fetchAPI(`/game/monthly/player/${game ?? "all"}/${identifier}/${year ?? new Date().getFullYear()}/${month ?? new Date().getMonth() + 1}`);
|
|
122
|
+
// /game/monthly/{game}/{player}/{month}/{year}
|
|
123
|
+
async _getStatisticsMonthly(identifier, month, year, options) {
|
|
124
|
+
const { data: response, error, meta, } = await this._fetchAPI(`/game/monthly/player/all/${identifier}/${year ?? new Date().getFullYear()}/${month ?? new Date().getMonth() + 1}`, options?.requestInit);
|
|
111
125
|
if (error)
|
|
112
126
|
return { data: null, error, meta };
|
|
113
|
-
if (game)
|
|
114
|
-
return { data: processGame(game, Timeframe.Monthly, false, response), error: null, meta };
|
|
115
127
|
let data = Object.fromEntries(Object.entries(response).map(([id, res]) => [id, id === "main" ? null : (processGame(id, Timeframe.Monthly, false, res) ?? null)]));
|
|
116
128
|
delete data.main;
|
|
117
129
|
return {
|
|
@@ -122,94 +134,84 @@ export default class HiveAPI {
|
|
|
122
134
|
meta,
|
|
123
135
|
};
|
|
124
136
|
}
|
|
125
|
-
|
|
137
|
+
// /game/season/player/{game}/{player}/{season}
|
|
138
|
+
async _getStatisticsSeasonal(identifier, game, season, options) {
|
|
126
139
|
if (!Games[game].statistics)
|
|
127
140
|
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
128
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/season/player/${game}/${identifier}/${season ?? 1}
|
|
141
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/season/player/${game}/${identifier}/${season ?? 1}`, options?.requestInit);
|
|
129
142
|
if (error)
|
|
130
143
|
return { data: null, error, meta };
|
|
131
144
|
return { data: processGame(game, Timeframe.Seasonal, false, response), error: null, meta };
|
|
132
145
|
}
|
|
133
|
-
async getAvailableMonthlyLeaderboards(game) {
|
|
134
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/monthly/${game}/available
|
|
146
|
+
async getAvailableMonthlyLeaderboards(game, options) {
|
|
147
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/monthly/${game}/available`, options?.requestInit);
|
|
135
148
|
if (error)
|
|
136
149
|
return { data: null, error, meta };
|
|
137
150
|
return { data: response, error: null, meta };
|
|
138
151
|
}
|
|
139
|
-
|
|
140
|
-
* `/game/season/player/{game}/{player}/{season}` Gets seasonal statistics for a player
|
|
141
|
-
* @param identifier Username or UUID of the player
|
|
142
|
-
* @param game The game to get the statistics for
|
|
143
|
-
* @param season The season to get the statistics for
|
|
144
|
-
* @returns The player's seasonal statistics
|
|
145
|
-
*/
|
|
146
|
-
async getSeasonalStatistics(identifier, game, season = 1) {
|
|
147
|
-
if (game && !Games[game].statistics)
|
|
148
|
-
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
149
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/season/player/${game}/${identifier}/${season}`);
|
|
150
|
-
if (error)
|
|
151
|
-
return { data: null, error, meta };
|
|
152
|
-
let data = processGame(game, Timeframe.Monthly, true, response);
|
|
153
|
-
return { data, error: null, meta };
|
|
154
|
-
}
|
|
155
|
-
async getLeaderboard(timeframe, game, options) {
|
|
152
|
+
async getLeaderboard(timeframe, game, ...args) {
|
|
156
153
|
if (game && !Games[game].statistics)
|
|
157
154
|
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
158
|
-
if (timeframe === Timeframe.Monthly)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
if (timeframe === Timeframe.Monthly) {
|
|
156
|
+
let month = args[0];
|
|
157
|
+
let year = args[1];
|
|
158
|
+
let options = args[2];
|
|
159
|
+
if (month !== undefined && (isNaN(month) || month < 1 || month > 12))
|
|
160
|
+
throw new Error("Month must be a number between 1 and 12");
|
|
161
|
+
if (year !== undefined && (isNaN(year) || year < 1970))
|
|
162
|
+
throw new Error("Year must be a number greater than or equal to 1970");
|
|
163
|
+
if (!month)
|
|
164
|
+
month = new Date().getMonth() + 1;
|
|
165
|
+
if (!year)
|
|
166
|
+
year = new Date().getFullYear();
|
|
167
|
+
return this._getLeaderboardMonthly(game, month, year, options);
|
|
168
|
+
}
|
|
169
|
+
if (timeframe === Timeframe.Seasonal) {
|
|
170
|
+
let season = args[0];
|
|
171
|
+
let options = args[1];
|
|
172
|
+
if (season !== undefined && (isNaN(season) || season < 1))
|
|
173
|
+
throw new Error("Season must be a positive integer");
|
|
174
|
+
if (!season)
|
|
175
|
+
season = 1;
|
|
176
|
+
return this._getLeaderboardSeasonal(game, season, options);
|
|
177
|
+
}
|
|
178
|
+
let options = args[0];
|
|
179
|
+
return this._getLeaderboardAllTime(game, options);
|
|
163
180
|
}
|
|
164
181
|
// /game/all/{game}
|
|
165
|
-
async _getLeaderboardAllTime(game) {
|
|
166
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/all/${game}
|
|
182
|
+
async _getLeaderboardAllTime(game, options) {
|
|
183
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/all/${game}`, options?.requestInit);
|
|
167
184
|
if (error)
|
|
168
185
|
return { data: null, error, meta };
|
|
169
186
|
let data = response.map((res) => processGame(game, Timeframe.AllTime, true, res));
|
|
170
187
|
return { data, error: null, meta };
|
|
171
188
|
}
|
|
172
189
|
// /game/monthly/{game}/{year}/{month}
|
|
173
|
-
async _getLeaderboardMonthly(game, month, year) {
|
|
190
|
+
async _getLeaderboardMonthly(game, month, year, options) {
|
|
174
191
|
if (game && !Games[game].statistics)
|
|
175
192
|
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
176
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/monthly/${game}/${year}/${month}
|
|
193
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/monthly/${game}/${year}/${month}`, options?.requestInit);
|
|
177
194
|
if (error)
|
|
178
195
|
return { data: null, error, meta };
|
|
179
196
|
let data = response.map((res) => processGame(game, Timeframe.Monthly, true, res));
|
|
180
197
|
return { data, error: null, meta };
|
|
181
198
|
}
|
|
182
199
|
// /game/season/{game}/season
|
|
183
|
-
async _getLeaderboardSeasonal(game, season = 1) {
|
|
200
|
+
async _getLeaderboardSeasonal(game, season = 1, options) {
|
|
184
201
|
if (game && !Games[game].statistics)
|
|
185
202
|
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
186
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/season/${game}/${season}
|
|
203
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/season/${game}/${season}`, options?.requestInit);
|
|
187
204
|
if (error)
|
|
188
205
|
return { data: null, error, meta };
|
|
189
206
|
let data = response.map((res) => processGame(game, Timeframe.Seasonal, true, res));
|
|
190
207
|
return { data, error: null, meta };
|
|
191
208
|
}
|
|
192
|
-
/**
|
|
193
|
-
* `/game/season/{game}/{season}` Gets seasonal statistics for a game
|
|
194
|
-
* @param game The game to get the statistics for
|
|
195
|
-
* @param season The season to get the statistics for
|
|
196
|
-
* @returns The seasonal statistics for the game
|
|
197
|
-
*/
|
|
198
|
-
async getSeasonalLeaderboard(game, season = 1) {
|
|
199
|
-
if (game && !Games[game].statistics)
|
|
200
|
-
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
201
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/season/${game}/${season ?? 1}`);
|
|
202
|
-
if (error)
|
|
203
|
-
return { data: null, error, meta };
|
|
204
|
-
let data = response.map((res) => processGame(game, Timeframe.Monthly, true, res));
|
|
205
|
-
return { data, error: null, meta };
|
|
206
|
-
}
|
|
207
209
|
/**
|
|
208
210
|
* `/global/statistics` Gets global statistics
|
|
209
211
|
* @returns The global statistics
|
|
210
212
|
*/
|
|
211
|
-
async getGlobalStatistics() {
|
|
212
|
-
const { data: response, error, meta } = await this._fetchAPI("/global/statistics");
|
|
213
|
+
async getGlobalStatistics(options) {
|
|
214
|
+
const { data: response, error, meta } = await this._fetchAPI("/global/statistics", options?.requestInit);
|
|
213
215
|
if (error)
|
|
214
216
|
return { data: null, error, meta };
|
|
215
217
|
return { data: response, error: null, meta };
|
|
@@ -219,10 +221,10 @@ export default class HiveAPI {
|
|
|
219
221
|
* @param game The game to get the maps for (fails for games without maps)
|
|
220
222
|
* @returns A list of maps in the game
|
|
221
223
|
*/
|
|
222
|
-
async getGameMaps(game) {
|
|
224
|
+
async getGameMaps(game, options) {
|
|
223
225
|
if (game && !Games[game].statistics)
|
|
224
226
|
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
225
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/map/${game}
|
|
227
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/map/${game}`, options?.requestInit);
|
|
226
228
|
if (error)
|
|
227
229
|
return { data: null, error, meta };
|
|
228
230
|
return { data: response, error: null, meta };
|
|
@@ -232,10 +234,10 @@ export default class HiveAPI {
|
|
|
232
234
|
* @param game The game to get the metadata for
|
|
233
235
|
* @returns The metadata for the game
|
|
234
236
|
*/
|
|
235
|
-
async getGameMetadata(game) {
|
|
237
|
+
async getGameMetadata(game, options) {
|
|
236
238
|
if (game && !Games[game].statistics)
|
|
237
239
|
throw new Error(`Statistics are not available for the game: ${game}`);
|
|
238
|
-
const { data: response, error, meta } = await this._fetchAPI(`/game/meta/${game}
|
|
240
|
+
const { data: response, error, meta } = await this._fetchAPI(`/game/meta/${game}`, options?.requestInit);
|
|
239
241
|
if (error)
|
|
240
242
|
return { data: null, error, meta };
|
|
241
243
|
return { data: response, error: null, meta };
|
package/lib/HiveAPI.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiveAPI.js","sourceRoot":"","sources":["../src/HiveAPI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAQ,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,iBAA8C,MAAM,wBAAwB,CAAC;AAIpF,OAAO,mBAAsD,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,WAAW,EAAyG,MAAM,sBAAsB,CAAC;AAU1J,MAAM,CAAC,OAAO,OAAO,OAAO;IACL;IAAnB,YAAmB,UAAmB,EAAE;QAArB,YAAO,GAAP,OAAO,CAAc;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,IAAI,iBAAiB,CAAC;IACrF,CAAC;IAEO,KAAK,CAAC,SAAS,CAAgB,QAAgB;QACnD,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,QAAQ,CA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5
|
-
"description": "An API wrapper for the Hive Minecraft Bedrock Edition server.",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"types": "lib/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./lib/index.d.ts",
|
|
11
|
-
"import": "./lib/index.js"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/CubeEdge-Studios/hive-bedrock.git"
|
|
17
|
-
},
|
|
18
|
-
"license": "MIT",
|
|
19
|
-
"author": "Cubeedge Studios",
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"hive-bedrock-data": "^4.
|
|
22
|
-
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "tsc"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"lib"
|
|
28
|
-
],
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"ts-node": "^10.9.1",
|
|
31
|
-
"typescript": "^5.1.3"
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "hive-bedrock-api",
|
|
3
|
+
"version": "4.4.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "An API wrapper for the Hive Minecraft Bedrock Edition server.",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/index.d.ts",
|
|
11
|
+
"import": "./lib/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/CubeEdge-Studios/hive-bedrock.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Cubeedge Studios",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"hive-bedrock-data": "^4.4.0"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"lib"
|
|
28
|
+
],
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"ts-node": "^10.9.1",
|
|
31
|
+
"typescript": "^5.1.3"
|
|
32
|
+
}
|
|
33
|
+
}
|