A NodeJS library for GitHub's Explore section 📣
🔥
Using npm:
$ npm install --save gh-explore
If you don't have or don't want to use npm:
$ cd ~/.node_modules
$ git clone git://github.com/gmontalvoriv/gh-explore.git
Using npm:
$ npm test
Using make:
$ make test
// Instantiate module
const ghExplore = require('gh-explore');
Note: Examples shown below assume you have already instantiated a global gh-explore
instance called ghExplore
and exclude error-checking code for brevity.
ghExplore.showcases(function (err, showcases) {
console.log(showcases);
});
ghExplore.showcases.get({ showcase: 'machine-learning' }, function (err, showcase) {
console.log(showcase);
});
ghExplore.showcases.search({ query: 'security' }, function (err, showcases) {
console.log(showcases);
});
ghExplore.integrations(function (err, integrations) {
console.log(integrations);
});
ghExplore.trending(function (err, repositories) {
console.log(repositories);
});
ghExplore.trending({ type: 'developers' }, function (err, topDevelopers) {
console.log(topDevelopers);
});
Fetch showcases.
.showcases(options, callback)
Parameters:
Name | Description | Type |
---|---|---|
page | for pagination | Integer |
Fetch showcase information.
.showcases.get(options, callback)
Parameters:
Name | Description | Type |
---|---|---|
showcase | showcase name | String |
sort | sort by most starred or by language | String |
Search showcases.
.showcases.search(options, callback)
Parameters:
Name | Description | Type |
---|---|---|
query | search query | String |
Fetch GitHub integrations.
.integrations(options, callback)
Parameters:
Name | Description | Type |
---|---|---|
category | filter by category | String |
Fetch GitHub integrations categories
.integrations.categories(callback)
Fetch integration information.
.integrations.get(options, callback)
Search integrations.
.integrations.search(options, callback)
Parameters:
Name | Description | Type |
---|---|---|
query | search query | String |
Fetch trending repositories and developers.
.trending(options, callback)
Parameters:
Name | Description | Type |
---|---|---|
type | type: 'developers' to fetch top developers |
String |
since | filter results by daily, weekly or monthly | String |
language | filter results by language | String |
Note: Type is set to repositories by default
MIT © Gabriel Montalvo