Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonschlinkert/repos
Pull down a list of GitHub repos for the given user or org, and save to a local JSON file.
https://github.com/jonschlinkert/repos
api github javascript nodejs repo repos repositories repository
Last synced: 7 days ago
JSON representation
Pull down a list of GitHub repos for the given user or org, and save to a local JSON file.
- Host: GitHub
- URL: https://github.com/jonschlinkert/repos
- Owner: jonschlinkert
- License: mit
- Created: 2014-04-04T23:33:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-08-27T22:08:05.000Z (about 6 years ago)
- Last Synced: 2024-10-30T00:38:18.272Z (17 days ago)
- Topics: api, github, javascript, nodejs, repo, repos, repositories, repository
- Language: JavaScript
- Homepage: https://github.com/jonschlinkert
- Size: 57.6 KB
- Stars: 23
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# repos [![NPM version](https://img.shields.io/npm/v/repos.svg?style=flat)](https://www.npmjs.com/package/repos) [![NPM monthly downloads](https://img.shields.io/npm/dm/repos.svg?style=flat)](https://npmjs.org/package/repos) [![NPM total downloads](https://img.shields.io/npm/dt/repos.svg?style=flat)](https://npmjs.org/package/repos)
> Tiny wrapper around github-base for getting publicly available information for a repository, or all of the repositories for one or more users or orgs, from the GitHub API.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save repos
```## Release history
See the [changelog](./CHANGELOG.md) for updates.
## Usage
This library is a tiny wrapper around [github-base](https://github.com/jonschlinkert/github-base), see that project's readme for more information about available options and authentication choices.
**Params**
* `users` **{String|Array}**: One or more users or organization names.
* `options` **{Object}**: See available [options](#options).
* `returns` **{Promise}****Example**
```js
const repos = require('repos');
const options = {
// see github-base for other authentication options
token: 'YOUR_GITHUB_AUTH_TOKEN'
};
repos(['doowb', 'jonschlinkert'], options)
.then(function(repos) {
// array of repository objects
console.log(repos);
})
.catch(console.error)
```See the [GitHub API documentation for repositories](https://developer.github.com/v3/repos/) for more details about the objects returned for each repository.
## Options
| **Option** | **Type** | **Default** | **Description** |
| --- | --- | --- | --- |
| `filterOrgs` | `function` | undefined | Function for filtering organizations from the result. |
| `filterRepos` | `function` | undefined | Function for filtering repositories from the result. |
| `sort` | `boolean` | `true` | By default, the returned list is sorted by repository `name` |## CLI
```sh
$ repos
```* `names` - one or more comma-separated user names or orgs
* `dest` - destination path to use, default is `repos.json`## About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Running Tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```### Related projects
You might also be interested in these projects:
* [gists](https://www.npmjs.com/package/gists): Methods for working with the GitHub Gist API. Node.js/JavaScript | [homepage](https://github.com/jonschlinkert/gists "Methods for working with the GitHub Gist API. Node.js/JavaScript")
* [github-base](https://www.npmjs.com/package/github-base): Low-level methods for working with the GitHub API in node.js/JavaScript. | [homepage](https://github.com/jonschlinkert/github-base "Low-level methods for working with the GitHub API in node.js/JavaScript.")
* [github-content](https://www.npmjs.com/package/github-content): Easily download files from github raw user content. | [homepage](https://github.com/doowb/github-content "Easily download files from github raw user content.")
* [github-contributors](https://www.npmjs.com/package/github-contributors): Generate a markdown or JSON list of contributors for a project using the GitHub API. | [homepage](https://github.com/jonschlinkert/github-contributors "Generate a markdown or JSON list of contributors for a project using the GitHub API.")
* [topics](https://www.npmjs.com/package/topics): Get and update GitHub repository topics. | [homepage](https://github.com/jonschlinkert/topics "Get and update GitHub repository topics.")### Author
**Jon Schlinkert**
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)### License
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 19, 2018._