-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathgroup.js
More file actions
40 lines (34 loc) · 892 Bytes
/
group.js
File metadata and controls
40 lines (34 loc) · 892 Bytes
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
/**!
* gitlab - lib/resources/group.js
*
* Copyright(c) repo-utils and other contributors.
* MIT Licensed
*
* Authors:
* fengmk2 <fengmk2@gmail.com> (http://fengmk2.com)
*/
'use strict';
/**
* Module dependencies.
*/
let util = require('util');
let restful = require('restful-client');
module.exports = Group;
function Group(client) {
this.constructor.super_.call(this, client, '/groups', 'id');
}
util.inherits(Group, restful.RESTFulResource);
/**
* Transfer a project to the Group namespace. Available only for admin
*
* POST /groups/:id/projects/:project_id
*
* @param {Object} params
* - {String} id group id
* - {String} project_id project id
* @param {Function(err, project)} callback
*/
Group.prototype.transferProject = function(params, callback) {
this.client.request('post', '/groups/:id/projects/:project_id', params, callback);
return this;
};