0.1.0 • Published 7 years ago

github-adapter v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

Github Adapter

NPM

A small javascript adapter library to help other javascript projects to use Github API.

Installation

Install using npm

$ npm install github-adapter --save

Install using yarn

$ yarn add github-adapter

Usage

// es6
import GithubAdapter from 'github-adapter';
// es5
var GithubAdapter = require('github-adapter');

Initialize the adapter using the github token

var adapter = new GithubAdapter(token);

Following API calls are supported

API

getRateLimit

Gets the current rate limit status set by the rate-limit-rules using this method

Parameters

getCurrentUser

Gets the current user for the token passed

Parameters

postIssue

Posts the issue

Parameters

getIssue

Gets a issue

Parameters

getPR

Gets a pull request

Parameters

getPRDiff

Gets the diff version of a pull request

Parameters

getPRFiles

Gets the list of files created/updated in the pull request. This also contains the patch which can be used to know the changes made to the file.

Parameters

getRawContent

Gets the raw content for a given full URL

Parameters

postPRComment

Creates a comment on a given line of a given PR

Parameters

requestCallback

This callback is displayed as part of the Requester class.

Parameters

  • error object The error object
  • data object Data received from api call
0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago