curtain-web-api 1.0.23 → 1.0.25
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.
|
@@ -41,4 +41,5 @@ export declare class CurtainWebAPI {
|
|
|
41
41
|
postPrimitiveStatsTest(data: any, type?: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
42
42
|
getDataAllListCategory(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
43
43
|
postCompareSession(idList: string[], matchType: string, studyList: string[], sessionId: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
44
|
+
getStatsSummary(lastNDays: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
44
45
|
}
|
|
@@ -155,6 +155,7 @@ class CurtainWebAPI {
|
|
|
155
155
|
this.user.curtainLinkLimit = response.data.curtain_link_limit;
|
|
156
156
|
this.user.totalCurtain = response.data.total_curtain;
|
|
157
157
|
this.user.curtainLinkLimitExceeded = response.data.curtain_link_limit_exceeded;
|
|
158
|
+
console.log(this.user);
|
|
158
159
|
return this.user.updateDB().then((response) => {
|
|
159
160
|
return this.user;
|
|
160
161
|
});
|
|
@@ -421,5 +422,11 @@ class CurtainWebAPI {
|
|
|
421
422
|
headers["Content-Type"] = "application/json";
|
|
422
423
|
return axios_1.default.post(this.baseURL + "compare-session/", { matchType, studyList, idList, sessionId }, { headers: headers, responseType: "json" }).then((response) => { return response; });
|
|
423
424
|
}
|
|
425
|
+
getStatsSummary(lastNDays) {
|
|
426
|
+
let headers = new axios_1.AxiosHeaders();
|
|
427
|
+
headers["Accept"] = "application/json";
|
|
428
|
+
headers["Content-Type"] = "application/json";
|
|
429
|
+
return this.axiosInstance.get(this.baseURL + `stats/summary/${lastNDays}/`, { responseType: "json", headers });
|
|
430
|
+
}
|
|
424
431
|
}
|
|
425
432
|
exports.CurtainWebAPI = CurtainWebAPI;
|
package/package.json
CHANGED
|
@@ -135,7 +135,9 @@ export class CurtainWebAPI {
|
|
|
135
135
|
this.user.curtainLinkLimit = response.data.curtain_link_limit;
|
|
136
136
|
this.user.totalCurtain = response.data.total_curtain;
|
|
137
137
|
this.user.curtainLinkLimitExceeded = response.data.curtain_link_limit_exceeded;
|
|
138
|
+
console.log(this.user)
|
|
138
139
|
return this.user.updateDB().then((response) => {
|
|
140
|
+
|
|
139
141
|
return this.user;
|
|
140
142
|
});
|
|
141
143
|
|
|
@@ -437,5 +439,12 @@ export class CurtainWebAPI {
|
|
|
437
439
|
headers["Content-Type"] = "application/json";
|
|
438
440
|
return axios.post(this.baseURL + "compare-session/", {matchType, studyList, idList, sessionId}, {headers: headers, responseType: "json"}).then((response) => {return response;});
|
|
439
441
|
}
|
|
442
|
+
|
|
443
|
+
getStatsSummary(lastNDays: number) {
|
|
444
|
+
let headers = new AxiosHeaders();
|
|
445
|
+
headers["Accept"] = "application/json";
|
|
446
|
+
headers["Content-Type"] = "application/json";
|
|
447
|
+
return this.axiosInstance.get(this.baseURL + `stats/summary/${lastNDays}/`, {responseType:"json", headers})
|
|
448
|
+
}
|
|
440
449
|
}
|
|
441
450
|
|