hive-bedrock-api 1.0.9 → 2.0.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.
Files changed (51) hide show
  1. package/README.md +37 -41
  2. package/lib/helpers/fetchEndpoint.d.ts +3 -0
  3. package/lib/{methods/fetchData.js → helpers/fetchEndpoint.js} +18 -14
  4. package/lib/helpers/isGame.d.ts +2 -0
  5. package/lib/helpers/isGame.js +7 -0
  6. package/lib/helpers/toPoint.d.ts +1 -0
  7. package/lib/helpers/toPoint.js +6 -0
  8. package/lib/index.d.ts +9 -9
  9. package/lib/index.js +13 -31
  10. package/lib/methods/getAllTimeLeaderboard.d.ts +4 -5
  11. package/lib/methods/getAllTimeLeaderboard.js +25 -19
  12. package/lib/methods/getAllTimeStatistics.d.ts +9 -0
  13. package/lib/methods/getAllTimeStatistics.js +180 -0
  14. package/lib/methods/getGlobalStatistics.d.ts +3 -3
  15. package/lib/methods/getGlobalStatistics.js +7 -30
  16. package/lib/methods/getMaps.d.ts +3 -4
  17. package/lib/methods/getMaps.js +17 -38
  18. package/lib/methods/getMetadata.d.ts +3 -0
  19. package/lib/methods/{getPlayerInfo.js → getMetadata.js} +20 -18
  20. package/lib/methods/getMonthlyLeaderboard.d.ts +9 -11
  21. package/lib/methods/getMonthlyLeaderboard.js +28 -56
  22. package/lib/methods/getMonthlyStatistics.d.ts +10 -0
  23. package/lib/methods/getMonthlyStatistics.js +154 -0
  24. package/lib/methods/getPlayerInfomation.d.ts +3 -0
  25. package/lib/methods/{getGameMetadata.js → getPlayerInfomation.js} +15 -21
  26. package/lib/processors/index.d.ts +7 -0
  27. package/lib/processors/index.js +116 -0
  28. package/lib/types/output.d.ts +67 -0
  29. package/lib/types/{GAMES.js → output.js} +1 -1
  30. package/lib/types/types.d.ts +21 -0
  31. package/package.json +7 -8
  32. package/lib/format/gameFormat.d.ts +0 -30
  33. package/lib/format/gameFormat.js +0 -164
  34. package/lib/methods/calculateLevel.d.ts +0 -2
  35. package/lib/methods/calculateLevel.js +0 -45
  36. package/lib/methods/fetchData.d.ts +0 -25
  37. package/lib/methods/getAllTimeStats.d.ts +0 -13
  38. package/lib/methods/getAllTimeStats.js +0 -186
  39. package/lib/methods/getGameMetadata.d.ts +0 -4
  40. package/lib/methods/getMonthlyStats.d.ts +0 -15
  41. package/lib/methods/getMonthlyStats.js +0 -192
  42. package/lib/methods/getPlayerInfo.d.ts +0 -4
  43. package/lib/types/API.d.ts +0 -224
  44. package/lib/types/API.js +0 -37
  45. package/lib/types/ENDPOINTS.d.ts +0 -11
  46. package/lib/types/GAMES.d.ts +0 -85
  47. package/lib/types/GAME_INFO.d.ts +0 -26
  48. package/lib/types/GAME_INFO.js +0 -113
  49. package/lib/types/METHODS.d.ts +0 -8
  50. package/lib/types/METHODS.js +0 -2
  51. /package/lib/types/{ENDPOINTS.js → types.js} +0 -0
@@ -1,113 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.GAME_INFO = exports.GAME = void 0;
5
- var GAME;
6
- (function (GAME) {
7
- GAME["HideAndSeek"] = "hide";
8
- GAME["DeathRun"] = "dr";
9
- GAME["TreasureWars"] = "wars";
10
- GAME["MurderMystery"] = "murder";
11
- GAME["SurvivalGames"] = "sg";
12
- GAME["Skywars"] = "sky";
13
- GAME["CaptureTheFlag"] = "ctf";
14
- GAME["BlockDrop"] = "drop";
15
- GAME["GroundWars"] = "ground";
16
- GAME["JustBuild"] = "build";
17
- GAME["BlockParty"] = "party";
18
- GAME["TheBridge"] = "bridge";
19
- GAME["Gravity"] = "grav";
20
- })(GAME || (exports.GAME = GAME = {}));
21
- exports.GAME_INFO = (_a = {},
22
- _a[GAME.TreasureWars] = {
23
- id: GAME.TreasureWars,
24
- maxLevel: 100,
25
- increment: 150,
26
- incrementCap: 52,
27
- prestige: true,
28
- },
29
- _a[GAME.DeathRun] = {
30
- id: GAME.DeathRun,
31
- maxLevel: 75,
32
- increment: 200,
33
- incrementCap: 42,
34
- prestige: false,
35
- },
36
- _a[GAME.HideAndSeek] = {
37
- id: GAME.HideAndSeek,
38
- maxLevel: 75,
39
- increment: 100,
40
- incrementCap: null,
41
- prestige: false,
42
- },
43
- _a[GAME.MurderMystery] = {
44
- id: GAME.MurderMystery,
45
- maxLevel: 100,
46
- increment: 100,
47
- incrementCap: 82,
48
- prestige: true,
49
- },
50
- _a[GAME.SurvivalGames] = {
51
- id: GAME.SurvivalGames,
52
- maxLevel: 30,
53
- increment: 150,
54
- incrementCap: null,
55
- prestige: false,
56
- },
57
- _a[GAME.Skywars] = {
58
- id: GAME.Skywars,
59
- maxLevel: 75,
60
- increment: 150,
61
- incrementCap: 52,
62
- prestige: false,
63
- },
64
- _a[GAME.JustBuild] = {
65
- id: GAME.JustBuild,
66
- maxLevel: 20,
67
- increment: 100,
68
- incrementCap: null,
69
- prestige: false,
70
- },
71
- _a[GAME.GroundWars] = {
72
- id: GAME.GroundWars,
73
- maxLevel: 20,
74
- increment: 150,
75
- incrementCap: null,
76
- prestige: false,
77
- },
78
- _a[GAME.BlockDrop] = {
79
- id: GAME.BlockDrop,
80
- maxLevel: 25,
81
- increment: 150,
82
- incrementCap: 22,
83
- prestige: false,
84
- },
85
- _a[GAME.CaptureTheFlag] = {
86
- id: GAME.CaptureTheFlag,
87
- maxLevel: 50,
88
- increment: 150,
89
- incrementCap: null,
90
- prestige: false,
91
- },
92
- _a[GAME.BlockParty] = {
93
- id: GAME.BlockParty,
94
- maxLevel: 25,
95
- increment: 150,
96
- incrementCap: null,
97
- prestige: false,
98
- },
99
- _a[GAME.TheBridge] = {
100
- id: GAME.TheBridge,
101
- maxLevel: 20,
102
- increment: 0,
103
- incrementCap: null,
104
- prestige: false,
105
- },
106
- _a[GAME.Gravity] = {
107
- id: GAME.Gravity,
108
- maxLevel: 25,
109
- increment: 150,
110
- incrementCap: null,
111
- prestige: false,
112
- },
113
- _a);
@@ -1,8 +0,0 @@
1
- export type MethodResponse<R> = {
2
- data: R | null;
3
- error: {
4
- message: string;
5
- status?: number;
6
- endpoint?: string;
7
- } | null;
8
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
File without changes