Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

gerrit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gerrit

Gerrit API based on offical REST API

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

gerrit

Gerrit API based on offical REST API

If links in this document not avaiable, please access README on GitHub directly.

Description

Gerrit API based on official REST API.

Table of Contents

Get Started

Class

const Rest = require('gerrit');
const apiconn = {
    username: 'http-username',
    password: 'http-password',
    endpoint: 'http://gerrit.example.com',
}

const rest = new Rest(apiconn);
rest.whoami().then(data => {
    // ...
}).catch(ex => {
    // ...
});

Standalone Function

const whoami = require('gerrit/whoami');
const apiconn = {
    username: 'http-username',
    password: 'http-password',
    endpoint: 'http://gerrit.example.com',
};

whoami(apiconn).then(data => {
    // ...
}).catch(ex => {
    // ...
});

API

  • Class Rest({ string username, string password, string endpoint })
  • Promise(Object) <rest>.whoami()
  • Promise(Object) <rest>.getProject({ string name })

All methods are asynchronous and will return instances of Promise. Hereafter, response means what to be obtained in .then((response) => { /* ... */ }).

All methods may be required and invoked by itself as what we see in Get Started, Standalone Function.

Examples

Before execute the examples, please replace the conn parameters according to your own account.

Keywords

gerrit

FAQs

Package last updated on 07 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts