forked from Ermlab/nxt-gitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseModel.js
More file actions
60 lines (52 loc) · 2.22 KB
/
BaseModel.js
File metadata and controls
60 lines (52 loc) · 2.22 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Generated by CoffeeScript 1.10.0
(function() {
var debug,
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
debug = require('debug')('gitlab:BaseModel');
module.exports = (function() {
function exports(client) {
this.client = client;
this._init = bind(this._init, this);
this.load = bind(this.load, this);
this._init();
}
exports.prototype.load = function(model) {
switch (model) {
case "Groups":
return require("./Models/Groups")(this.client);
case "Issues":
return require("./Models/Issues")(this.client);
case "ProjectDeployKeys":
return require("./Models/ProjectDeployKeys")(this.client);
case "ProjectHooks":
return require("./Models/ProjectHooks")(this.client);
case "ProjectIssues":
return require("./Models/ProjectIssues")(this.client);
case "ProjectMembers":
return require("./Models/ProjectMembers")(this.client);
case "ProjectMergeRequests":
return require("./Models/ProjectMergeRequests")(this.client);
case "ProjectMilestones":
return require("./Models/ProjectMilestones")(this.client);
case "ProjectRepository":
return require("./Models/ProjectRepository")(this.client);
case "Projects":
return require("./Models/Projects")(this.client);
case "Users":
return require("./Models/Users")(this.client);
}
};
exports.prototype._init = function() {
this.debug = require('debug')("gitlab:Models:" + this.constructor.name);
this.get = this.client.get;
this.post = this.client.post;
this.put = this.client.put;
this["delete"] = this.client["delete"];
if (this.init != null) {
return this.init();
}
};
return exports;
})();
}).call(this);
//# sourceMappingURL=BaseModel.js.map