ensembledata 0.1.0 → 0.1.4

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/src/requester.js CHANGED
@@ -13,7 +13,7 @@ export class Requester {
13
13
  * @type {number}
14
14
  * @readonly
15
15
  */
16
- #timeoutSecs;
16
+ #timeout;
17
17
 
18
18
  /**
19
19
  * @type {number}
@@ -24,29 +24,28 @@ export class Requester {
24
24
  /**
25
25
  * @param {{
26
26
  * token: string;
27
- * timeoutSecs: number;
27
+ * timeout: number;
28
28
  * maxNetworkRetries: number;
29
29
  * }} options
30
30
  */
31
- constructor({ token, timeoutSecs, maxNetworkRetries }) {
31
+ constructor({ token, timeout, maxNetworkRetries }) {
32
32
  this.#token = token;
33
- this.#timeoutSecs = timeoutSecs;
33
+ this.#timeout = timeout;
34
34
  this.#maxNetworkRetries = maxNetworkRetries;
35
35
  }
36
36
 
37
37
  /**
38
38
  * @param {string} path
39
39
  * @param {Record<string, any>} params
40
- * @param {{ timeoutSecs?: number; returnTopLevelData?: boolean }} options
40
+ * @param {{ timeout?: number; returnTopLevelData?: boolean }} options
41
41
  * @returns {Promise<EDResponse>}
42
42
  */
43
43
  async get(path, params, options = {}) {
44
44
  params = { ...params, token: this.#token };
45
45
  const queryParams = new URLSearchParams(params).toString();
46
46
  const timeoutMS =
47
- (options.timeoutSecs === undefined
48
- ? this.#timeoutSecs
49
- : options.timeoutSecs) * 1_000;
47
+ (options.timeout === undefined ? this.#timeout : options.timeout) *
48
+ 1_000;
50
49
  const returnTopLevelData = options.returnTopLevelData || false;
51
50
 
52
51
  for (let i = 0; i < this.#maxNetworkRetries; i++) {
package/src/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.1.0";
1
+ export const VERSION = "0.1.4";