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

github-adapter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-adapter

Adapter for calling github API.

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 15 Jan 2017

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

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