-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
43 lines (35 loc) · 995 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const {DomoClient} = require('domo-sdk');
const DomoConstants = require('domo-sdk/dist/common/Constants');
const User = require('./lib/user');
const Dataset = require('./lib/dataset');
const Pdp = require('./lib/pdp');
const Group = require('./lib/group');
class DomoreClient {
constructor(clientId, clientSecret, scopes, host = 'api.domo.com') {
this.clientId = clientId;
this.clientSecret = clientSecret;
this.scopes = scopes;
this.host = host;
this.domoClient = new DomoClient(clientId, clientSecret, scopes, host);
this.user = new User(this.domoClient);
this.dataset = new Dataset(this.domoClient);
this.policy = new Pdp(this.domoClient);
this.group = new Group(this.domoClient);
}
get domo() {
return this.domoClient;
}
get users() {
return this.user;
}
get datasets() {
return this.dataset;
}
get policies() {
return this.policy;
}
get groups() {
return this.group;
}
}
module.exports = DomoreClient;