@ejercito-fam/habbo-api 1.3.0 → 1.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.
Files changed (56) hide show
  1. package/dist/cjs/index.cjs +16 -12
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/index.d.cts +48 -32
  4. package/dist/esm/index.d.ts +48 -32
  5. package/dist/esm/index.js +16 -12
  6. package/dist/esm/index.js.map +1 -1
  7. package/package.json +2 -2
  8. package/dist/common.d.ts +0 -2
  9. package/dist/common.d.ts.map +0 -1
  10. package/dist/common.js +0 -4
  11. package/dist/common.js.map +0 -1
  12. package/dist/constants.d.ts +0 -25
  13. package/dist/constants.d.ts.map +0 -1
  14. package/dist/constants.js +0 -26
  15. package/dist/constants.js.map +0 -1
  16. package/dist/habbo.d.ts +0 -22
  17. package/dist/habbo.d.ts.map +0 -1
  18. package/dist/habbo.js +0 -64
  19. package/dist/habbo.js.map +0 -1
  20. package/dist/index.d.ts +0 -10
  21. package/dist/index.d.ts.map +0 -1
  22. package/dist/index.js +0 -10
  23. package/dist/index.js.map +0 -1
  24. package/dist/routes/achievements.d.ts +0 -52
  25. package/dist/routes/achievements.d.ts.map +0 -1
  26. package/dist/routes/achievements.js +0 -40
  27. package/dist/routes/achievements.js.map +0 -1
  28. package/dist/routes/base.d.ts +0 -13
  29. package/dist/routes/base.d.ts.map +0 -1
  30. package/dist/routes/base.js +0 -44
  31. package/dist/routes/base.js.map +0 -1
  32. package/dist/routes/groups.d.ts +0 -112
  33. package/dist/routes/groups.d.ts.map +0 -1
  34. package/dist/routes/groups.js +0 -53
  35. package/dist/routes/groups.js.map +0 -1
  36. package/dist/routes/lists.d.ts +0 -21
  37. package/dist/routes/lists.d.ts.map +0 -1
  38. package/dist/routes/lists.js +0 -38
  39. package/dist/routes/lists.js.map +0 -1
  40. package/dist/routes/marketplace.d.ts +0 -35
  41. package/dist/routes/marketplace.d.ts.map +0 -1
  42. package/dist/routes/marketplace.js +0 -25
  43. package/dist/routes/marketplace.js.map +0 -1
  44. package/dist/routes/ping.d.ts +0 -10
  45. package/dist/routes/ping.d.ts.map +0 -1
  46. package/dist/routes/ping.js +0 -17
  47. package/dist/routes/ping.js.map +0 -1
  48. package/dist/routes/rooms.d.ts +0 -30
  49. package/dist/routes/rooms.d.ts.map +0 -1
  50. package/dist/routes/rooms.js +0 -15
  51. package/dist/routes/rooms.js.map +0 -1
  52. package/dist/routes/users.d.ts +0 -518
  53. package/dist/routes/users.d.ts.map +0 -1
  54. package/dist/routes/users.js +0 -168
  55. package/dist/routes/users.js.map +0 -1
  56. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,112 +0,0 @@
1
- import { type FetchResult } from '@skyra/safe-fetch';
2
- import { BaseAPI, type APIOptions } from './base.js';
3
- import type { HabboRoomUniqueId } from './rooms.js';
4
- export declare class GroupsAPI extends BaseAPI {
5
- /**
6
- * Get the data for a group given its identifier
7
- *
8
- * @param id - The ID of the group
9
- * @param options - The options for the API call
10
- */
11
- getByUniqueId(id: HabboGroupId, options?: APIOptions): Promise<FetchResult<HabboGroup>>;
12
- /**
13
- * Get the members from a group given its identifier
14
- *
15
- * @param id - The ID of the group
16
- * @param options - The options for the API call
17
- */
18
- getGroupMembers(id: HabboGroupId, options?: APIOptions): Promise<FetchResult<HabboGroupMember[]>>;
19
- /**
20
- * Get the image URL for a badge
21
- *
22
- * @param badgeCode - The badge's code, retrieved from {@linkcode HabboGroup.badgeCode}
23
- *
24
- * @unstable This feature is not documented, use at your own risk
25
- */
26
- getGroupBadgeImageURL(badgeCode: string): URL;
27
- }
28
- export type HabboGroupId = `g-hh${string}-${string};`;
29
- /**
30
- * Represents a Habbo group.
31
- */
32
- export interface HabboGroup {
33
- /**
34
- * The unique identifier of the group.
35
- */
36
- id: HabboGroupId;
37
- /**
38
- * The name of the group.
39
- */
40
- name: string;
41
- /**
42
- * The description of the group.
43
- */
44
- description: string;
45
- /**
46
- * The type of the group.
47
- */
48
- type: HabboGroupType;
49
- /**
50
- * The ID of the room associated with the group, or null if no room is associated.
51
- */
52
- roomId: HabboRoomUniqueId;
53
- /**
54
- * The badge code of the group.
55
- */
56
- badgeCode: string;
57
- }
58
- /**
59
- * Enum representing the type of a Habbo group.
60
- */
61
- export declare enum HabboGroupType {
62
- /**
63
- * A normal group (public).
64
- */
65
- NORMAL = "NORMAL",
66
- /**
67
- * A favourite (exclusive) group.
68
- */
69
- FAVOURITE = "EXCLUSIVE",
70
- /**
71
- * A private (closed) group.
72
- */
73
- PRIVATE = "CLOSED"
74
- }
75
- /**
76
- * Represents a member of a Habbo group.
77
- */
78
- export interface HabboGroupMember {
79
- /**
80
- * Indicates whether the member is online.
81
- */
82
- online: boolean;
83
- /**
84
- * The gender of the member.
85
- */
86
- gender: 'm' | 'f';
87
- /**
88
- * The motto of the member.
89
- */
90
- motto: string;
91
- /**
92
- * The figure of the member in the Habbo world.
93
- */
94
- habboFigure: string;
95
- /**
96
- * The date since the member joined the group.
97
- */
98
- memberSince: string;
99
- /**
100
- * The unique identifier of the member.
101
- */
102
- uniqueId: string;
103
- /**
104
- * The name of the member.
105
- */
106
- name: string;
107
- /**
108
- * Indicates whether the member is an admin of the group.
109
- */
110
- isAdmin: boolean;
111
- }
112
- //# sourceMappingURL=groups.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/routes/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,qBAAa,SAAU,SAAQ,OAAO;IACrC;;;;;OAKG;IACI,aAAa,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAK9F;;;;;OAKG;IACI,eAAe,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAKxG;;;;;;OAMG;IACI,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG;CAGpD;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,IAAI,MAAM,GAAG,CAAA;AAErD;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,EAAE,EAAE,YAAY,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,oBAAY,cAAc;IACzB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,OAAO,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CACjB"}
@@ -1,53 +0,0 @@
1
- import { Json } from '@skyra/safe-fetch';
2
- import { BaseAPI } from './base.js';
3
- export class GroupsAPI extends BaseAPI {
4
- /**
5
- * Get the data for a group given its identifier
6
- *
7
- * @param id - The ID of the group
8
- * @param options - The options for the API call
9
- */
10
- getByUniqueId(id, options) {
11
- const url = this.formatURL(`/api/public/groups/${id}`);
12
- return Json(this.fetch(url, options));
13
- }
14
- /**
15
- * Get the members from a group given its identifier
16
- *
17
- * @param id - The ID of the group
18
- * @param options - The options for the API call
19
- */
20
- getGroupMembers(id, options) {
21
- const url = this.formatURL(`/api/public/groups/${id}/members`);
22
- return Json(this.fetch(url, options));
23
- }
24
- /**
25
- * Get the image URL for a badge
26
- *
27
- * @param badgeCode - The badge's code, retrieved from {@linkcode HabboGroup.badgeCode}
28
- *
29
- * @unstable This feature is not documented, use at your own risk
30
- */
31
- getGroupBadgeImageURL(badgeCode) {
32
- return this.formatURL(`/habbo-imaging/badge/${badgeCode}`);
33
- }
34
- }
35
- /**
36
- * Enum representing the type of a Habbo group.
37
- */
38
- export var HabboGroupType;
39
- (function (HabboGroupType) {
40
- /**
41
- * A normal group (public).
42
- */
43
- HabboGroupType["NORMAL"] = "NORMAL";
44
- /**
45
- * A favourite (exclusive) group.
46
- */
47
- HabboGroupType["FAVOURITE"] = "EXCLUSIVE";
48
- /**
49
- * A private (closed) group.
50
- */
51
- HabboGroupType["PRIVATE"] = "CLOSED";
52
- })(HabboGroupType || (HabboGroupType = {}));
53
- //# sourceMappingURL=groups.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../src/routes/groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAoB,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAmB,MAAM,WAAW,CAAC;AAGrD,MAAM,OAAO,SAAU,SAAQ,OAAO;IACrC;;;;;OAKG;IACI,aAAa,CAAC,EAAgB,EAAE,OAAoB;QAC1D,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAC;QACvD,OAAO,IAAI,CAAa,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACI,eAAe,CAAC,EAAgB,EAAE,OAAoB;QAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAqB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED;;;;;;OAMG;IACI,qBAAqB,CAAC,SAAiB;QAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,wBAAwB,SAAS,EAAE,CAAC,CAAC;IAC5D,CAAC;CACD;AAuCD;;GAEG;AACH,MAAM,CAAN,IAAY,cAeX;AAfD,WAAY,cAAc;IACzB;;OAEG;IACH,mCAAiB,CAAA;IAEjB;;OAEG;IACH,yCAAuB,CAAA;IAEvB;;OAEG;IACH,oCAAkB,CAAA;AACnB,CAAC,EAfW,cAAc,KAAd,cAAc,QAezB"}
@@ -1,21 +0,0 @@
1
- import { type FetchResult } from '@skyra/safe-fetch';
2
- import { BaseAPI, type APIOptions } from './base.js';
3
- export declare class ListsAPI extends BaseAPI {
4
- #private;
5
- /**
6
- * Get the hot looks from the hotel
7
- *
8
- * @param options - The options for the API call
9
- */
10
- getHotLooks(options: APIOptions): Promise<FetchResult<HabboHotLookList>>;
11
- }
12
- export interface HabboHotLookList {
13
- url: string;
14
- entries: HabboHotLookListItem[];
15
- }
16
- export interface HabboHotLookListItem {
17
- gender: 'f' | 'm';
18
- figure: string;
19
- hash: string;
20
- }
21
- //# sourceMappingURL=lists.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/routes/lists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAErD,qBAAa,QAAS,SAAQ,OAAO;;IACpC;;;;OAIG;IACU,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;CAoBrF;AAED,MAAM,WAAW,gBAAgB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,oBAAoB,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb"}
@@ -1,38 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _ListsAPI_instances, _ListsAPI_parseHotLooksXML;
7
- import {} from '@skyra/safe-fetch';
8
- import { BaseAPI } from './base.js';
9
- export class ListsAPI extends BaseAPI {
10
- constructor() {
11
- super(...arguments);
12
- _ListsAPI_instances.add(this);
13
- }
14
- /**
15
- * Get the hot looks from the hotel
16
- *
17
- * @param options - The options for the API call
18
- */
19
- async getHotLooks(options) {
20
- const url = this.formatURL('/api/public/lists/hotlooks');
21
- const data = await this.fetch(url, options);
22
- return data.map(async (result) => __classPrivateFieldGet(this, _ListsAPI_instances, "m", _ListsAPI_parseHotLooksXML).call(this, await result.text())).intoPromise();
23
- }
24
- }
25
- _ListsAPI_instances = new WeakSet(), _ListsAPI_parseHotLooksXML = function _ListsAPI_parseHotLooksXML(data) {
26
- const urlResult = /url="(.*)"/.exec(data);
27
- if (urlResult === null)
28
- throw new SyntaxError('Could not read hot looks');
29
- const url = urlResult[1];
30
- const entries = [];
31
- for (const result of data.matchAll(/gender="(\w)" figure="(.+)" hash="(.+)"/g)) {
32
- entries.push({ gender: result[1], figure: result[2], hash: result[3] });
33
- }
34
- if (entries.length === 0)
35
- throw new SyntaxError('Could not read hot looks');
36
- return { url, entries };
37
- };
38
- //# sourceMappingURL=lists.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/routes/lists.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAmB,MAAM,WAAW,CAAC;AAErD,MAAM,OAAO,QAAS,SAAQ,OAAO;IAArC;;;IA0BA,CAAC;IAzBA;;;;OAIG;IACI,KAAK,CAAC,WAAW,CAAC,OAAmB;QAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;QACzD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,uBAAA,IAAI,uDAAkB,MAAtB,IAAI,EAAmB,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC9F,CAAC;CAgBD;sGAdkB,IAAY;IAC7B,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,SAAS,KAAK,IAAI;QAAE,MAAM,IAAI,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAE1E,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,OAAO,GAAG,EAA4B,CAAC;IAC7C,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,0CAA0C,CAAC,EAAE,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAc,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACtF,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,WAAW,CAAC,0BAA0B,CAAC,CAAC;IAE5E,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;AACzB,CAAC"}
@@ -1,35 +0,0 @@
1
- import { type FetchResult } from '@skyra/safe-fetch';
2
- import { BaseAPI, type APIOptions } from './base.js';
3
- export declare class MarketplaceAPI extends BaseAPI {
4
- /**
5
- * Get the marketplace stats for a room item
6
- *
7
- * @param roomItemName - The name of the room item
8
- * @param options - The options for the API call
9
- */
10
- getRoomItemStats(roomItemName: string, options?: APIOptions): Promise<FetchResult<MarketplaceStats>>;
11
- /**
12
- * Get the marketplace stats for a wall item
13
- *
14
- * @param wallItemName - The name of the wall item
15
- * @param options - The options for the API call
16
- */
17
- getWallItemStats(wallItemName: string, options?: APIOptions): Promise<FetchResult<MarketplaceStats>>;
18
- }
19
- export interface MarketplaceStats {
20
- history: MarketplaceStatsHistory[];
21
- statsDate: `${bigint}-${bigint}-${bigint}`;
22
- soldItemCount: number;
23
- creditSum: number;
24
- averagePrice: number;
25
- totalOpenOffers: number;
26
- historyLimitInDays: number;
27
- }
28
- export interface MarketplaceStatsHistory {
29
- dayOffset: `${bigint}`;
30
- averagePrice: `${bigint}`;
31
- totalSoldItems: `${bigint}`;
32
- totalCreditSum: `${bigint}`;
33
- totalOpenOffers: `${bigint}`;
34
- }
35
- //# sourceMappingURL=marketplace.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/routes/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAErD,qBAAa,cAAe,SAAQ,OAAO;IAC1C;;;;;OAKG;IACI,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAK3G;;;;;OAKG;IACI,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;CAI3G;AAED,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACnC,SAAS,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACvC,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC;IAC1B,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IAC5B,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IAC5B,eAAe,EAAE,GAAG,MAAM,EAAE,CAAC;CAC7B"}
@@ -1,25 +0,0 @@
1
- import { Json } from '@skyra/safe-fetch';
2
- import { BaseAPI } from './base.js';
3
- export class MarketplaceAPI extends BaseAPI {
4
- /**
5
- * Get the marketplace stats for a room item
6
- *
7
- * @param roomItemName - The name of the room item
8
- * @param options - The options for the API call
9
- */
10
- getRoomItemStats(roomItemName, options) {
11
- const url = this.formatURL(`/api/public/marketplace/stats/roomItem/${roomItemName}`);
12
- return Json(this.fetch(url, options));
13
- }
14
- /**
15
- * Get the marketplace stats for a wall item
16
- *
17
- * @param wallItemName - The name of the wall item
18
- * @param options - The options for the API call
19
- */
20
- getWallItemStats(wallItemName, options) {
21
- const url = this.formatURL(`/api/public/marketplace/stats/wallItem/${wallItemName}`);
22
- return Json(this.fetch(url, options));
23
- }
24
- }
25
- //# sourceMappingURL=marketplace.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketplace.js","sourceRoot":"","sources":["../../src/routes/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAoB,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAmB,MAAM,WAAW,CAAC;AAErD,MAAM,OAAO,cAAe,SAAQ,OAAO;IAC1C;;;;;OAKG;IACI,gBAAgB,CAAC,YAAoB,EAAE,OAAoB;QACjE,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,0CAA0C,YAAY,EAAE,CAAC,CAAC;QACrF,OAAO,IAAI,CAAmB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACI,gBAAgB,CAAC,YAAoB,EAAE,OAAoB;QACjE,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,0CAA0C,YAAY,EAAE,CAAC,CAAC;QACrF,OAAO,IAAI,CAAmB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC;CACD"}
@@ -1,10 +0,0 @@
1
- import { type APIOptions, BaseAPI } from './base.js';
2
- export declare class PingAPI extends BaseAPI {
3
- /**
4
- * Pings Habbo, returning the measured time using {@linkcode performance.now()}
5
- *
6
- * @param options - The options for the API call
7
- */
8
- get(options?: APIOptions): Promise<number | null>;
9
- }
10
- //# sourceMappingURL=ping.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ping.d.ts","sourceRoot":"","sources":["../../src/routes/ping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAErD,qBAAa,OAAQ,SAAQ,OAAO;IACnC;;;;OAIG;IACU,GAAG,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAQ9D"}
@@ -1,17 +0,0 @@
1
- import { BaseAPI } from './base.js';
2
- export class PingAPI extends BaseAPI {
3
- /**
4
- * Pings Habbo, returning the measured time using {@linkcode performance.now()}
5
- *
6
- * @param options - The options for the API call
7
- */
8
- async get(options) {
9
- const url = this.formatURL('/api/public/ping');
10
- const now = performance.now();
11
- return (await this.fetch(url, options)).match({
12
- ok: () => performance.now() - now,
13
- err: () => null
14
- });
15
- }
16
- }
17
- //# sourceMappingURL=ping.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ping.js","sourceRoot":"","sources":["../../src/routes/ping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,OAAO,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,OAAO,OAAQ,SAAQ,OAAO;IACnC;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,OAAoB;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QAC/C,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAC9B,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;YAC7C,EAAE,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG;YACjC,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI;SACf,CAAC,CAAC;IACJ,CAAC;CACD"}
@@ -1,30 +0,0 @@
1
- import { type FetchResult } from '@skyra/safe-fetch';
2
- import { type APIOptions, BaseAPI } from './base.js';
3
- export declare class RoomsAPI extends BaseAPI {
4
- /**
5
- * Get a room by its ID
6
- *
7
- * @param roomId - The ID of the room
8
- * @param options - The options for the API call
9
- */
10
- getById(roomId: number, options?: APIOptions): Promise<FetchResult<HabboRoom>>;
11
- }
12
- export interface HabboRoom {
13
- id: number;
14
- name: string;
15
- description: string;
16
- creationTime: `${bigint}-${bigint}-${bigint}T${string}`;
17
- habboGroupId: string;
18
- tags: string[];
19
- maximumVisitors: number;
20
- showOwnerName: boolean;
21
- ownerName: string;
22
- ownerUniqueId: string;
23
- categories: string[];
24
- thumbnailUrl: string;
25
- imageUrl: string;
26
- rating: number;
27
- uniqueId: HabboRoomUniqueId;
28
- }
29
- export type HabboRoomUniqueId = `r-hh${string}-${string}`;
30
- //# sourceMappingURL=rooms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/routes/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAQ,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAErD,qBAAa,QAAS,SAAQ,OAAO;IACpC;;;;;OAKG;IACU,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;CAI3F;AAED,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,MAAM,IAAI,MAAM,EAAE,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Json } from '@skyra/safe-fetch';
2
- import { BaseAPI } from './base.js';
3
- export class RoomsAPI extends BaseAPI {
4
- /**
5
- * Get a room by its ID
6
- *
7
- * @param roomId - The ID of the room
8
- * @param options - The options for the API call
9
- */
10
- async getById(roomId, options) {
11
- const url = this.formatURL(`/api/public/rooms/${roomId}`);
12
- return Json(this.fetch(url, options));
13
- }
14
- }
15
- //# sourceMappingURL=rooms.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rooms.js","sourceRoot":"","sources":["../../src/routes/rooms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAmB,OAAO,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,OAAO,QAAS,SAAQ,OAAO;IACpC;;;;;OAKG;IACI,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,OAAoB;QACxD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,qBAAqB,MAAM,EAAE,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAY,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;IAClD,CAAC;CACD"}