@veritree/services 2.36.1 → 2.36.3
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/package.json +1 -4
- package/src/endpoints/regions.js +15 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veritree/services",
|
|
3
|
-
"version": "2.36.
|
|
3
|
+
"version": "2.36.3",
|
|
4
4
|
"description": "A collection of javascript functions/services to talk to veritree API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -12,8 +12,5 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"np": "^7.6.2"
|
|
15
|
-
},
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">16.0.0 <=18.16.0"
|
|
18
15
|
}
|
|
19
16
|
}
|
package/src/endpoints/regions.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import Api from
|
|
1
|
+
import Api from "../helpers/api";
|
|
2
2
|
|
|
3
3
|
class RegionsApi extends Api {
|
|
4
4
|
constructor(resource) {
|
|
5
5
|
super(resource);
|
|
6
|
-
this.resource =
|
|
6
|
+
this.resource = "regions";
|
|
7
7
|
}
|
|
8
|
+
|
|
8
9
|
stats(region) {
|
|
9
10
|
const all = async () => {
|
|
10
11
|
const url = `${this.getUrl()}/${region}/stats`;
|
|
@@ -15,6 +16,7 @@ class RegionsApi extends Api {
|
|
|
15
16
|
all,
|
|
16
17
|
};
|
|
17
18
|
}
|
|
19
|
+
|
|
18
20
|
stakeholders(region) {
|
|
19
21
|
const all = async (params) => {
|
|
20
22
|
const url = `${this.getUrl()}/${region}/stakeholders${this.getUrlParams(
|
|
@@ -27,15 +29,17 @@ class RegionsApi extends Api {
|
|
|
27
29
|
all,
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
|
|
33
|
+
public() {
|
|
34
|
+
const all = async () => {
|
|
35
|
+
const url = `${this.getUrl()}/public${this.getUrlParams()}`;
|
|
36
|
+
return await this.get(url);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
all,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
export const Regions = new RegionsApi();
|