@liberfi.io/react-predict 0.3.66 → 0.3.67
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.mts +11 -6
- package/dist/index.d.ts +11 -6
- package/dist/index.js +120 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +120 -31
- package/dist/index.mjs.map +1 -1
- package/dist/{server-pS5Vlydo.d.mts → server-B6SSpkMN.d.mts} +14 -3
- package/dist/{server-pS5Vlydo.d.ts → server-B6SSpkMN.d.ts} +14 -3
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +3 -2
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +3 -2
- package/dist/server.mjs.map +1 -1
- package/package.json +3 -3
package/dist/server.mjs
CHANGED
|
@@ -222,8 +222,9 @@ var PredictClient = class {
|
|
|
222
222
|
return await httpGet(url);
|
|
223
223
|
}
|
|
224
224
|
/** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
|
|
225
|
-
async getPriceHistory(slug,
|
|
226
|
-
const
|
|
225
|
+
async getPriceHistory(slug, sourceOrParams, range) {
|
|
226
|
+
const params = typeof sourceOrParams === "string" ? { source: sourceOrParams, range } : sourceOrParams;
|
|
227
|
+
const query = buildQuery(params);
|
|
227
228
|
const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}/price-history${query}`;
|
|
228
229
|
return await httpGet(url);
|
|
229
230
|
}
|