Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitlab

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitlab - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

32

lib/ApiBaseHTTP.js
// Generated by CoffeeScript 1.6.2
(function() {
var ApiBase, _ref,
var ApiBase, querystring, _ref,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },

@@ -10,2 +10,4 @@ __hasProp = {}.hasOwnProperty,

querystring = require('querystring');
module.exports.ApiBaseHTTP = (function(_super) {

@@ -76,15 +78,32 @@ __extends(ApiBaseHTTP, _super);

ApiBaseHTTP.prototype._translateUrl = function(path) {
return ("" + this.options.path + "/" + this.options.base_url + "/" + path + "?private_token=" + this.options.token).replace(/\/\//, '/');
ApiBaseHTTP.prototype._translateUrl = function(path, params) {
var url;
if (params == null) {
params = {};
}
url = ("" + this.options.path + "/" + this.options.base_url + "/" + path + "?private_token=" + this.options.token).replace(/\/\//, '/');
if (params) {
url += "&" + (querystring.stringify(params));
}
return url;
};
ApiBaseHTTP.prototype.get = function(path, fn) {
ApiBaseHTTP.prototype.get = function(path, params, fn) {
var options;
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
if ('function' === typeof params) {
fn = params;
params = {};
}
options = {
path: this._translateUrl(path),
method: 'GET'
path: this._translateUrl(path, params),
method: 'GET',
params: params
};

@@ -194,2 +213,3 @@ return this._request(options, fn);

}
console.log(options);
this.debug(options.path);

@@ -196,0 +216,0 @@ this._request_options(options);

@@ -29,10 +29,21 @@ // Generated by CoffeeScript 1.6.2

Projects.prototype.all = function(fn) {
var _this = this;
Projects.prototype.all = function(params, fn) {
var _ref1,
_this = this;
if (params == null) {
params = {};
}
if (fn == null) {
fn = null;
}
if ('function' === typeof params) {
fn = params;
params = {};
}
this.debug("Projects::all()");
return this.get("projects", function(data) {
if ((_ref1 = params.per_page) == null) {
params.per_page = 100;
}
return this.get("projects", params, function(data) {
if (fn) {

@@ -39,0 +50,0 @@ return fn(data);

2

package.json
{
"name": "gitlab",
"version": "0.2.1",
"version": "0.2.2",
"description": "gitlab api nodejs library",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc