@veritree/services 2.49.0 → 2.51.0
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/index.js +2 -0
- package/package.json +1 -1
- package/src/endpoints/organizations.js +13 -0
- package/src/endpoints/pins.js +21 -0
package/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { Initiatives } from './src/endpoints/initiatives';
|
|
|
11
11
|
import { Methodologies } from './src/endpoints/methodologies';
|
|
12
12
|
import { Notes } from './src/endpoints/notes';
|
|
13
13
|
import { Orgs } from './src/endpoints/orgs';
|
|
14
|
+
import { Pins } from './src/endpoints/pins';
|
|
14
15
|
import { Regions } from './src/endpoints/regions';
|
|
15
16
|
import { Resellers } from './src/endpoints/resellers';
|
|
16
17
|
import { SDGs } from './src/endpoints/sdgs';
|
|
@@ -54,6 +55,7 @@ export {
|
|
|
54
55
|
Methodologies,
|
|
55
56
|
Notes,
|
|
56
57
|
Orgs,
|
|
58
|
+
Pins,
|
|
57
59
|
Regions,
|
|
58
60
|
Resellers,
|
|
59
61
|
SDGs,
|
package/package.json
CHANGED
|
@@ -55,6 +55,19 @@ class OrganizationsApi extends Api {
|
|
|
55
55
|
return { all };
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
pins(orgId) {
|
|
59
|
+
const single = async (pinId, params) => {
|
|
60
|
+
const url = `${this.getUrl()}/${orgId}/pins/${pinId}${this.getUrlParams(
|
|
61
|
+
params
|
|
62
|
+
)}`;
|
|
63
|
+
return await this.get(url);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
single,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
58
71
|
metrics(orgId) {
|
|
59
72
|
const all = async (args) => {
|
|
60
73
|
const url = `${this.getUrl()}/${orgId}/metrics${this.getUrlParams(args)}`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Api from '../helpers/api';
|
|
2
|
+
|
|
3
|
+
class PinsApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = 'pins';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
evidence(pinId) {
|
|
10
|
+
const all = async (args) => {
|
|
11
|
+
const url = `${this.getUrl()}/${pinId}/evidence/${this.getUrlParams(
|
|
12
|
+
args
|
|
13
|
+
)}`;
|
|
14
|
+
return await this.get(url);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return { all };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const Pins = new PinsApi();
|