Socket
Socket
Sign inDemoInstall

node-gitlab

Package Overview
Dependencies
2
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

lib/hook.js

6

History.md
0.0.2 / 2013-03-25
==================
* add hook, issue, member, milestone, project
* remove client config
0.0.1 / 2013-03-22

@@ -3,0 +9,0 @@ ==================

@@ -15,2 +15,6 @@ /*!

var Milestone = require('./milestone');
var Project = require('./project');
var Member = require('./member');
var Hook = require('./hook');
var Issue = require('./issue');

@@ -29,2 +33,6 @@ /**

this.milestones = new Milestone(this);
this.projects = new Project(this);
this.members = new Member(this);
this.hooks = new Hook(this);
this.issues = new Issue(this);
}

@@ -64,2 +72,5 @@

err.statusCode = res && res.statusCode;
err.method = method;
err.url = url;
err.requestData = data;
return callback(err);

@@ -71,3 +82,7 @@ }

err.data = result;
err.headers = res.headers;
err.statusCode = res.statusCode;
err.method = method;
err.url = url;
err.requestData = data;
return callback(err);

@@ -74,0 +89,0 @@ }

64

lib/milestone.js

@@ -13,62 +13,10 @@ /*!

var util = require('util');
var Resource = require('./resource');
function Milestone(client) {
this.client = client;
this.path = '/projects/:id/milestones';
this.onePath = this.path + '/:milestone_id';
Resource.call(this, client, '/projects/:id/milestones', 'milestone_id');
}
util.inherits(Milestone, Resource);
/**
* Get a project's milestone.
*
* @param {Object} params
* - {Number} id, project's id
* - {Number} milestone_id, milestone's id.
* @param {Function(err, row)} callback
*/
Milestone.prototype.get = function (params, callback) {
this.client.request('get', this.onePath, params, callback);
};
/**
* List a project's all milestones.
*
* @param {Object} params
* - {Number} id, project's id.
* - {Number} [page=1], page number, default is `1`.
* - {Number} [perPage=20], number of items to list per page, max is `100`.
* @param {Function(err, rows)} callback
*/
Milestone.prototype.list = function (params, callback) {
this.client.request('get', this.path, params, callback);
};
/**
* Create a milestone.
*
* @param {Object} params
* - {Number} id (required) - The ID of a project
* - {String} title (required) - The title of an milestone
* - {String} [description] (optional) - The description of the milestone
* - {String} [due_date] (optional) - The due date of the milestone
* @param {Function(err, row)} callback
*/
Milestone.prototype.create = function (params, callback) {
this.client.request('post', this.path, params, callback);
};
/**
* Update a milestone.
* @param {Object} params
* - {Number} id (required) - The ID of a project
* - {Number} milestone_id (required) - The ID of a project milestone
* - {String} title (required) - The title of an milestone
* - {String} [description] (optional) - The description of the milestone
* - {String} [due_date] (optional) - The due date of the milestone
* - {String} [closed] (optional) - The status of the milestone
* @param {Function(err, row)} callback
*/
Milestone.prototype.update = function (params, callback) {
this.client.request('put', this.onePath, params, callback);
};
module.exports = Milestone;
module.exports = Milestone;
{
"name": "node-gitlab",
"version": "0.0.1",
"version": "0.0.2",
"description": "gitlab",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,3 +23,3 @@ gitlab [![Build Status](https://secure.travis-ci.org/fengmk2/gitlab.png)](http://travis-ci.org/fengmk2/gitlab) [![Dependencies](http://david-dm.org/fengmk2/gitlab.png)](http://david-dm.org/fengmk2/gitlab)

var client = gitlab.create({
api: 'http://gitlab.com/api/v3',
api: 'https://gitlab.com/api/v3',
privateToken: 'your private token'

@@ -26,0 +26,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc