New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-github.js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-github.js

A simple node.js wrapper for the Github API V3

latest
Source
npmnpm
Version
1.0.10
Version published
Maintainers
1
Created
Source

node-github.js


NPM version NPM downloads circleci

A simple node.js wrapper for the Github API V3
npm installnfo

  • 📦 Lightweight: Modular to the core. Less then 200 lines of clean and optimized code.
  • 🔰 Simplistic: Build to be beginner friendly, to suit everyone's needs.

Installation

npm install node-github.js --save

Dependencies

It depends on axios as a main dependency and moment to parse the date/time returned by the data.

npm install

Declaration

const GithubClient = require("node-github.js");
const client = new GithubClient();

Usage

The methods return a Promise. You can resolve it using .then() to get the results.

client.getUser("Sync-Codes").then((data) => console.log(data)); // returns a user object with the data

Result Data

{
  username: 'Sync-Codes',
  avatar: 'https://avatars.githubusercontent.com/u/37131433?v=4',
  name: 'Bhavya Dang',
  bio: 'Web Developer and Designer',
  website: 'https://synxc.carrd.co/',
  followers: 11,
  following: 25,
  createdAt: 'Mar 7th, 2018',
  location: 'India',
  total_public_repos: 45,
  total_private_repos: 'None'
}

Other Methods

.getUserRepo(para)

Returns a repo object with the Repositiory data of the username passed as para.

.getUserOrgs(para)

Returns a orgs object with the Organization data of the username passed as para.

.searchUsers(query)

Returns an object containing the best match results of the user. Filtered by the query parameter passed.

.searchTopics(query)

Returns an object containing the best match results of the topic. Filtered by the query. The topic is always a featured topic.

Contact

You can contact me on my Discord (Sync#9069).

Issues

Found an issue? Open up an issue here!

License

© Sync-Codes, 2020
Released under MIT License.

Keywords

wrapper

FAQs

Package last updated on 09 Sep 2022

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