@veritree/services 2.18.1-3 → 2.18.1-4
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 +4 -2
- package/package.json +1 -1
- package/src/endpoints/resellers.js +37 -0
package/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { Images } from './src/endpoints/images';
|
|
|
10
10
|
import { Orgs } from './src/endpoints/orgs';
|
|
11
11
|
import { Notes } from './src/endpoints/notes';
|
|
12
12
|
import { Regions } from './src/endpoints/regions';
|
|
13
|
+
import { Resellers } from './src/endpoints/resellers';
|
|
13
14
|
import { SDGs } from './src/endpoints/sdgs';
|
|
14
15
|
import { Sponsors } from './src/endpoints/sponsors';
|
|
15
16
|
import { Standards } from './src/endpoints/standards';
|
|
@@ -26,7 +27,7 @@ import { FieldReports } from './src/endpoints/field-reports';
|
|
|
26
27
|
import { ExternalReports } from './src/endpoints/external-reports';
|
|
27
28
|
import { Evidence } from './src/endpoints/evidence';
|
|
28
29
|
import { Crumbs } from './src/endpoints/crumbs';
|
|
29
|
-
import { Verifications } from './src/endpoints/verifications';
|
|
30
|
+
import { Verifications } from './src/endpoints/verifications';
|
|
30
31
|
import { ImagesAggregated } from './src/endpoints/images-aggregated';
|
|
31
32
|
import { ssoToken } from './src/endpoints/sso-token';
|
|
32
33
|
|
|
@@ -43,6 +44,7 @@ export {
|
|
|
43
44
|
Orgs,
|
|
44
45
|
Notes,
|
|
45
46
|
Regions,
|
|
47
|
+
Resellers,
|
|
46
48
|
SDGs,
|
|
47
49
|
Sponsors,
|
|
48
50
|
Standards,
|
|
@@ -61,5 +63,5 @@ export {
|
|
|
61
63
|
Crumbs,
|
|
62
64
|
Verifications,
|
|
63
65
|
ImagesAggregated,
|
|
64
|
-
ssoToken
|
|
66
|
+
ssoToken,
|
|
65
67
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import Api from '../helpers/api';
|
|
2
|
+
|
|
3
|
+
class ResellersApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = 'resellers';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
statsSold() {
|
|
10
|
+
const all = async () => {
|
|
11
|
+
const url = `${this.getUrl()}/1/pstats/sold?pretty=1`;
|
|
12
|
+
let response;
|
|
13
|
+
try {
|
|
14
|
+
response = await this.get(url);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console.log('error ', e);
|
|
17
|
+
}
|
|
18
|
+
return response;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
all,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
statsPurchased() {
|
|
27
|
+
const all = async () => {
|
|
28
|
+
const url = `${this.getUrl()}/1/pstats/purchased?pretty=1`;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
all,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Resellers = new ResellersApi();
|