curtain-web-api 1.0.57 → 1.0.58
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.
|
@@ -52,10 +52,14 @@ export declare class CurtainWebAPI {
|
|
|
52
52
|
getRandomDataCiteSuffix(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
53
53
|
submitDataCite(data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
54
54
|
getDataCite(id: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
55
|
+
getDataCites(url?: string, title?: string, status?: string, limit?: number, offset?: number, manage?: boolean): Promise<import("axios").AxiosResponse<any, any>>;
|
|
55
56
|
getDataCiteTimeLimitedPermissionToken(suffix: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
56
57
|
getDataCiteProxyOrcidPublicRecord(orcid: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
57
58
|
getDataCiteQuota(): Promise<import("axios").AxiosResponse<{
|
|
58
59
|
quota: number;
|
|
59
60
|
max_quota: number;
|
|
60
61
|
}, any>>;
|
|
62
|
+
updateDataCite(id: number, data: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
63
|
+
deleteDataCite(id: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
64
|
+
changeDataCiteStatus(id: number, status: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
61
65
|
}
|
|
@@ -577,6 +577,26 @@ class CurtainWebAPI {
|
|
|
577
577
|
headers["Accept"] = "application/json";
|
|
578
578
|
return this.axiosInstance.get(this.baseURL + "datacite/" + id + "/", { headers: headers, responseType: "json" });
|
|
579
579
|
}
|
|
580
|
+
getDataCites(url, title, status, limit = 10, offset = 0, manage = false) {
|
|
581
|
+
let headers = new axios_1.AxiosHeaders();
|
|
582
|
+
headers["Accept"] = "application/json";
|
|
583
|
+
let params = new URLSearchParams();
|
|
584
|
+
if (url !== undefined) {
|
|
585
|
+
params.append("url", url);
|
|
586
|
+
}
|
|
587
|
+
if (title !== undefined) {
|
|
588
|
+
params.append("title", title);
|
|
589
|
+
}
|
|
590
|
+
if (status !== undefined) {
|
|
591
|
+
params.append("status", status);
|
|
592
|
+
}
|
|
593
|
+
if (manage !== undefined) {
|
|
594
|
+
params.append("manage", manage.toString());
|
|
595
|
+
}
|
|
596
|
+
params.append("limit", limit.toString());
|
|
597
|
+
params.append("offset", offset.toString());
|
|
598
|
+
return this.axiosInstance.get(this.baseURL + "datacite/", { headers: headers, params: params, responseType: "json" });
|
|
599
|
+
}
|
|
580
600
|
getDataCiteTimeLimitedPermissionToken(suffix) {
|
|
581
601
|
let headers = new axios_1.AxiosHeaders();
|
|
582
602
|
headers["Accept"] = "application/json";
|
|
@@ -592,5 +612,22 @@ class CurtainWebAPI {
|
|
|
592
612
|
headers["Accept"] = "application/json";
|
|
593
613
|
return this.axiosInstance.get(this.baseURL + "datacite/get_quota/", { headers: headers, responseType: "json" });
|
|
594
614
|
}
|
|
615
|
+
updateDataCite(id, data) {
|
|
616
|
+
let headers = new axios_1.AxiosHeaders();
|
|
617
|
+
headers["Accept"] = "application/json";
|
|
618
|
+
headers["Content-Type"] = "application/json";
|
|
619
|
+
return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/", data, { headers: headers, responseType: "json" });
|
|
620
|
+
}
|
|
621
|
+
deleteDataCite(id) {
|
|
622
|
+
let headers = new axios_1.AxiosHeaders();
|
|
623
|
+
headers["Accept"] = "application/json";
|
|
624
|
+
return this.axiosInstance.delete(this.baseURL + "datacite/" + id + "/", { headers: headers, responseType: "json" });
|
|
625
|
+
}
|
|
626
|
+
changeDataCiteStatus(id, status) {
|
|
627
|
+
let headers = new axios_1.AxiosHeaders();
|
|
628
|
+
headers["Accept"] = "application/json";
|
|
629
|
+
headers["Content-Type"] = "application/json";
|
|
630
|
+
return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/change_status/", { status: status }, { headers: headers, responseType: "json" });
|
|
631
|
+
}
|
|
595
632
|
}
|
|
596
633
|
exports.CurtainWebAPI = CurtainWebAPI;
|
package/package.json
CHANGED
|
@@ -591,6 +591,27 @@ export class CurtainWebAPI {
|
|
|
591
591
|
return this.axiosInstance.get(this.baseURL + "datacite/" + id + "/", {headers: headers, responseType: "json"})
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
+
getDataCites(url?: string, title?: string, status?: string, limit: number = 10, offset = 0, manage: boolean = false) {
|
|
595
|
+
let headers = new AxiosHeaders()
|
|
596
|
+
headers["Accept"] = "application/json"
|
|
597
|
+
let params = new URLSearchParams()
|
|
598
|
+
if (url !== undefined) {
|
|
599
|
+
params.append("url", url)
|
|
600
|
+
}
|
|
601
|
+
if (title !== undefined) {
|
|
602
|
+
params.append("title", title)
|
|
603
|
+
}
|
|
604
|
+
if (status !== undefined) {
|
|
605
|
+
params.append("status", status)
|
|
606
|
+
}
|
|
607
|
+
if (manage !== undefined) {
|
|
608
|
+
params.append("manage", manage.toString())
|
|
609
|
+
}
|
|
610
|
+
params.append("limit", limit.toString())
|
|
611
|
+
params.append("offset", offset.toString())
|
|
612
|
+
return this.axiosInstance.get(this.baseURL + "datacite/", {headers: headers, params: params, responseType: "json"})
|
|
613
|
+
}
|
|
614
|
+
|
|
594
615
|
getDataCiteTimeLimitedPermissionToken(suffix: string) {
|
|
595
616
|
let headers = new AxiosHeaders()
|
|
596
617
|
headers["Accept"] = "application/json"
|
|
@@ -608,5 +629,25 @@ export class CurtainWebAPI {
|
|
|
608
629
|
headers["Accept"] = "application/json"
|
|
609
630
|
return this.axiosInstance.get<{quota: number, max_quota: number}>(this.baseURL + "datacite/get_quota/", {headers: headers, responseType: "json"})
|
|
610
631
|
}
|
|
632
|
+
|
|
633
|
+
updateDataCite(id: number, data: any) {
|
|
634
|
+
let headers = new AxiosHeaders()
|
|
635
|
+
headers["Accept"] = "application/json"
|
|
636
|
+
headers["Content-Type"] = "application/json"
|
|
637
|
+
return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/", data, {headers: headers, responseType: "json"})
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
deleteDataCite(id: number) {
|
|
641
|
+
let headers = new AxiosHeaders()
|
|
642
|
+
headers["Accept"] = "application/json"
|
|
643
|
+
return this.axiosInstance.delete(this.baseURL + "datacite/" + id + "/", {headers: headers, responseType: "json"})
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
changeDataCiteStatus(id: number, status: string) {
|
|
647
|
+
let headers = new AxiosHeaders()
|
|
648
|
+
headers["Accept"] = "application/json"
|
|
649
|
+
headers["Content-Type"] = "application/json"
|
|
650
|
+
return this.axiosInstance.post(this.baseURL + "datacite/" + id + "/change_status/", {status: status}, {headers: headers, responseType: "json"})
|
|
651
|
+
}
|
|
611
652
|
}
|
|
612
653
|
|