github-repos-search-trial-pkg

1.1.0 • Public • Published

github-repos-search

Get a list of Github repositories of specified username sorted by numbers of stars in descending order and last updated time

Installation

# using npm
npm github-repos-search-trial-pkg

# using yarn
yarn add github-repos-search-trial-pkg

Usage

# using require
const { getRepos } = require('github-repos-search-trial-pkg');

# using import
import { getRepos } from 'github-repos-search-trial-pkg';

Example

Using promises:

getRepos({
  username: 'gaearon', // provide GitHub username here
  page: 1, // optional property: default value is 1
  per_page: 50 // optional property: default value is 30
}).then((repositories) => console.log(repositories));

Using async/await:

const getRepositories = async function () {
  const repositories = await getRepos({
    username: 'gaearon', // provide GitHub username here
    page: 1, // optional property: default value is 1
    per_page: 50 // optional property: default value is 30
  });
  console.log(repositories);
};

getRepositories();

Package Sidebar

Install

npm i github-repos-search-trial-pkg

Weekly Downloads

2

Version

1.1.0

License

ISC

Unpacked Size

3.53 kB

Total Files

7

Last publish

Collaborators

  • xoxo789