@quantcdn/quant-client 2.0.4 → 2.0.6
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/src/client.js +3 -4
- package/dist/src/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/src/client.js
CHANGED
|
@@ -91,6 +91,7 @@ class HttpClient {
|
|
|
91
91
|
}
|
|
92
92
|
class QuantClient {
|
|
93
93
|
constructor(config, Client) {
|
|
94
|
+
var _a, _b;
|
|
94
95
|
this.project = {
|
|
95
96
|
/**
|
|
96
97
|
* Ping and ensure the API credentials are valid.
|
|
@@ -99,8 +100,6 @@ class QuantClient {
|
|
|
99
100
|
* The response object.
|
|
100
101
|
*/
|
|
101
102
|
ping: () => __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
console.log('ping');
|
|
103
|
-
console.log(this._project);
|
|
104
103
|
return yield this._project.get('ping');
|
|
105
104
|
}),
|
|
106
105
|
/**
|
|
@@ -330,14 +329,14 @@ class QuantClient {
|
|
|
330
329
|
if (typeof Client === 'undefined') {
|
|
331
330
|
Client = HttpClient;
|
|
332
331
|
}
|
|
333
|
-
this._project = new Client('https://api.quantcdn.io/v1', {
|
|
332
|
+
this._project = new Client((_a = config.endpoint) !== null && _a !== void 0 ? _a : 'https://api.quantcdn.io/v1', {
|
|
334
333
|
'User-Agent': 'Quant (+http://api.quantcdn.io)',
|
|
335
334
|
'Quant-Token': config.token,
|
|
336
335
|
'Quant-Customer': config.organization,
|
|
337
336
|
'Quant-Project': config.project,
|
|
338
337
|
'Content-Type': 'application/json'
|
|
339
338
|
});
|
|
340
|
-
this._search = new Client('https://api.quantcdn.io/v1', {
|
|
339
|
+
this._search = new Client((_b = config.endpoint) !== null && _b !== void 0 ? _b : 'https://api.quantcdn.io/v1', {
|
|
341
340
|
'User-Agent': 'Quant (+http://api.quantcdn.io)',
|
|
342
341
|
'Quant-Token': config.token,
|
|
343
342
|
'Quant-Customer': config.organization,
|
package/dist/src/types.d.ts
CHANGED