worldstate-emitter 2.4.0 → 2.4.2
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/index.d.ts +56 -0
- package/dist/index.js +1305 -0
- package/dist/index.mjs +36 -40
- package/package.json +14 -6
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import EventEmitter from "node:events";
|
|
2
|
+
import { RSSItem } from "rss-feed-emitter";
|
|
3
|
+
import WorldState from "warframe-worldstate-parser";
|
|
4
|
+
|
|
5
|
+
//#region index.d.ts
|
|
6
|
+
interface WorldstateEmitterOptions {
|
|
7
|
+
locale?: string;
|
|
8
|
+
features?: string[];
|
|
9
|
+
}
|
|
10
|
+
interface RssFeedItem {
|
|
11
|
+
url: string;
|
|
12
|
+
items: RSSItem[];
|
|
13
|
+
}
|
|
14
|
+
interface DebugInfo {
|
|
15
|
+
rss?: RssFeedItem[];
|
|
16
|
+
worldstate?: WorldState;
|
|
17
|
+
twitter?: unknown;
|
|
18
|
+
}
|
|
19
|
+
declare class WorldstateEmitter extends EventEmitter {
|
|
20
|
+
#private;
|
|
21
|
+
static make({
|
|
22
|
+
locale,
|
|
23
|
+
features
|
|
24
|
+
}?: WorldstateEmitterOptions): Promise<WorldstateEmitter>;
|
|
25
|
+
/**
|
|
26
|
+
* Pull in and instantiate emitters
|
|
27
|
+
* @param options - Configuration options
|
|
28
|
+
*/
|
|
29
|
+
constructor({
|
|
30
|
+
locale
|
|
31
|
+
}?: WorldstateEmitterOptions);
|
|
32
|
+
/**
|
|
33
|
+
* Set up internal logging
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
private setupLogging;
|
|
37
|
+
/**
|
|
38
|
+
* Get current rss feed items
|
|
39
|
+
* @returns RSS feed items
|
|
40
|
+
*/
|
|
41
|
+
getRss(): RssFeedItem[] | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Get a specific worldstate, defaulting to 'pc' for the platform and 'en' for the language
|
|
44
|
+
* @param language - locale/language to fetch
|
|
45
|
+
* @returns Requested worldstate
|
|
46
|
+
*/
|
|
47
|
+
getWorldstate(language?: string): WorldState | undefined;
|
|
48
|
+
get debug(): DebugInfo;
|
|
49
|
+
/**
|
|
50
|
+
* Get Twitter data
|
|
51
|
+
* @returns Promised twitter data
|
|
52
|
+
*/
|
|
53
|
+
getTwitter(): Promise<unknown>;
|
|
54
|
+
destroy(): void;
|
|
55
|
+
}
|
|
56
|
+
export = WorldstateEmitter;
|