1.0.8 • Published 4 years ago
github-api-global v1.0.8
GitHub Api's
To make a request to github by using gitHub api
Installation
$ npm install github-api-global
Usage
var { githubData } = require("github-api-global");
GitHub Api Request
// To make a request to github by using gitHub api
const options = {
token: "1e3ed294c3f7tce7btdcdg18t88d98b743f9ac48t135656",
method: "get", // As per request
path: "/user/repos", // As per request, Flow gitHub api docs for path below
// You can add body param as per gitHub api docs as per request method
body: {
name: "name",
description: "description",
},
};
console.log( githubData(options) ); // returns <data>
For more gethub api url path and body options flow github docs.
To authenticate with GitHub, set the token
option.
License
Copyright
Copyright © 2021. S.Gupta