Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhavya-dang/node-github.js
A lightweight and fully maintained NodeJS Wrapper for the Github API V3.
https://github.com/bhavya-dang/node-github.js
api api-wrapper github github-api npm npm-module npm-package wrapper wrapper-api
Last synced: 30 days ago
JSON representation
A lightweight and fully maintained NodeJS Wrapper for the Github API V3.
- Host: GitHub
- URL: https://github.com/bhavya-dang/node-github.js
- Owner: bhavya-dang
- License: mit
- Created: 2020-06-02T05:49:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-09T19:45:05.000Z (over 2 years ago)
- Last Synced: 2024-11-09T20:44:16.158Z (about 1 month ago)
- Topics: api, api-wrapper, github, github-api, npm, npm-module, npm-package, wrapper, wrapper-api
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/node-github.js
- Size: 33.2 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-github.js
- 📦 **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
```bash
npm install node-github.js --save
```## Dependencies
It depends on [axios](https://npmjs.org/package/axios) as a main dependency and [moment](https://npmjs.org/package/moment) to parse the date/time returned by the data.
```bash
npm install
```## Declaration
```js
const GithubClient = require("node-github.js");
const client = new GithubClient();
```## Usage
The methods return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#:~:text=Description,when%20the%20promise%20is%20created.&text=This%20lets%20asynchronous%20methods%20return,some%20point%20in%20the%20future.). You can resolve it using `.then()` to get the results.
```js
client.getUser("Sync-Codes").then((data) => console.log(data)); // returns a user object with the data
```## Result Data
```js
{
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!](https://github.com/Sync-Codes/node-github.js/issues/**new**)
## License
© Sync-Codes, 2020
Released under MIT License.