-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.js
More file actions
47 lines (37 loc) · 1.03 KB
/
index.js
File metadata and controls
47 lines (37 loc) · 1.03 KB
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
44
/*
* class NodeJP Client
*
* @author Kai Sasaki <lewuathe@me.com>
* @date 2013-07-01
*
*/
var apiClient = require('./lib/apiClient.js');
var Client = module.exports = function(config) {
var self = this;
self.config = config;
self.appId = config.appId;
}
Client.prototype.list = function(params, cb) {
var self = this;
var getStatsListClient = new apiClient('getStatsList');
params.appId = self.appId;
getStatsListClient.request(params, cb);
}
Client.prototype.meta = function(params, cb){
var self = this;
var getMetaInfoClient = new apiClient('getMetaInfo');
params.appId = self.appId;
getMetaInfoClient.request(params, cb);
}
Client.prototype.save = function(params, cb) {
var self = this;
var postDatasetClient = new apiClient('postDataset');
params.appId = self.appId;
postDatasetClient.request(params, cb);
}
Client.prototype.search = function(params, cb) {
var self = this;
var getStatsDataClient = new apiClient('getStatsData');
params.appId = self.appId;
getStatsDataClient.request(params, cb);
}