https://github.com/daim-nickel-penny/git-search
An NPM library which returns the user's repositories.
https://github.com/daim-nickel-penny/git-search
npm-package
Last synced: 3 months ago
JSON representation
An NPM library which returns the user's repositories.
- Host: GitHub
- URL: https://github.com/daim-nickel-penny/git-search
- Owner: Daim-Nickel-Penny
- Created: 2021-02-15T06:56:24.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-15T07:30:27.000Z (over 4 years ago)
- Last Synced: 2024-04-25T07:00:31.116Z (about 1 year ago)
- Topics: npm-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/git-search-repos
- Size: 110 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git-Search
This library returns the list of github repositories.
The list is sorted in the **descending** order and the **last updated time**### For Installation
- **NPM** installation
`npm install github-repos-search`
- **Yarn** Installation
`yarn add github-repos-search`### Usage
- using `import`
`import { getRepos } from 'github-repos-search';`- using `require`
`const { getRepos } = require('github-repos-search');`### Code Snippet
#### using promises
`getRepos({
username: 'YOUR_USERNAME', // replace this with the github username
page: 1, // optional property: default value is 1 for 1 page
per_page: 50 // optional property: default value is 30 for the list length of repositories
}).then((repositories) => console.log(repositories));
//check the console for output in JSON#### using async/await
const getRepositories = async function () {
const repositories = await getRepos({
username: 'YOUR_USERNAME', // replace this with the github username
page: 1, // optional property: default value is 1 for 1 page
per_page: 50 // optional property: default value is 30 for the list length of repositories
});
console.log(repositories);
//check the console for output in JSON
};getRepositories();