laplace-api 4.2.0 → 4.3.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/package.json
CHANGED
|
@@ -112,16 +112,10 @@ export class LivePriceWebSocketClient {
|
|
|
112
112
|
private lastMessageTimestamp: number = 0;
|
|
113
113
|
private inactivityCheckInterval: NodeJS.Timeout | null = null;
|
|
114
114
|
private readonly INACTIVITY_TIMEOUT = 15000;
|
|
115
|
-
private externalUserId: string | null = null;
|
|
116
|
-
private feeds: LivePriceFeed[] | null = null;
|
|
117
115
|
|
|
118
116
|
constructor(
|
|
119
|
-
feeds: LivePriceFeed[],
|
|
120
|
-
externalUserId: string,
|
|
121
117
|
options: WebSocketOptions = {}
|
|
122
118
|
) {
|
|
123
|
-
this.feeds = feeds;
|
|
124
|
-
this.externalUserId = externalUserId;
|
|
125
119
|
this.options = {
|
|
126
120
|
enableLogging: true,
|
|
127
121
|
logLevel: LogLevel.Error,
|
|
@@ -187,9 +181,6 @@ export class LivePriceWebSocketClient {
|
|
|
187
181
|
|
|
188
182
|
async connect(url: string): Promise<WebSocket> {
|
|
189
183
|
this.log("Connecting to WebSocket...");
|
|
190
|
-
if (!this.externalUserId || !this.feeds) {
|
|
191
|
-
throw new Error("External user ID and feeds are required");
|
|
192
|
-
}
|
|
193
184
|
|
|
194
185
|
this.wsUrl = url;
|
|
195
186
|
|
package/src/test/readme.test.ts
CHANGED
|
@@ -67,10 +67,7 @@ describe("README Examples - Comprehensive Tests", () => {
|
|
|
67
67
|
livePriceClient = new LivePriceClient(config, logger);
|
|
68
68
|
brokerClient = new BrokerClient(config, logger);
|
|
69
69
|
searchClient = new SearchClient(config, logger);
|
|
70
|
-
webSocketClient = new LivePriceWebSocketClient(
|
|
71
|
-
[LivePriceFeed.LiveBist, LivePriceFeed.LiveUs],
|
|
72
|
-
"test-user-id",
|
|
73
|
-
);
|
|
70
|
+
webSocketClient = new LivePriceWebSocketClient();
|
|
74
71
|
capitalIncreaseClient = new CapitalIncreaseClient(config, logger);
|
|
75
72
|
customThemeClient = new CustomThemeClient(config, logger);
|
|
76
73
|
keyInsightClient = new KeyInsightClient(config, logger);
|