https://github.com/jonschlinkert/github-trees
Get a tree from a GitHub repository.
https://github.com/jonschlinkert/github-trees
api github javascript nodejs tree trees
Last synced: 30 days ago
JSON representation
Get a tree from a GitHub repository.
- Host: GitHub
- URL: https://github.com/jonschlinkert/github-trees
- Owner: jonschlinkert
- License: mit
- Created: 2017-08-21T21:47:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-23T18:56:20.000Z (over 7 years ago)
- Last Synced: 2025-05-08T04:54:50.518Z (30 days ago)
- Topics: api, github, javascript, nodejs, tree, trees
- Language: JavaScript
- Homepage: https://github.com/jonschlinkert
- Size: 8.79 KB
- Stars: 7
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/contributing.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# github-trees [](https://www.npmjs.com/package/github-trees) [](https://npmjs.org/package/github-trees) [](https://npmjs.org/package/github-trees)
> Get a tree from a GitHub repository.
Follow this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), for updates on this project and others.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save github-trees
```## Usage
See [github-base](https://github.com/jonschlinkert/github-base) for documentation for all options and authentication choices.
```js
var tree = require('github-trees');
var opts = {
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD'
};tree('breakdance/breakdance', opts)
.then(function(res) {
console.log(res);
})
```## Get a Tree Recursively
```js
var tree = require('github-trees');
var opts = {
recursive: true,
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD'
};tree('breakdance/breakdance', opts)
.then(function(res) {
console.log(res);
})
```## About
### Related projects
You might also be interested in these projects:
* [get-file](https://www.npmjs.com/package/get-file): CLI to get a single file from Github repository. | [homepage](https://github.com/jonschlinkert/get-file "CLI to get a single file from Github repository.")
* [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): JavaScript wrapper that greatly simplifies working with GitHub's API. | [homepage](https://github.com/jonschlinkert/github-base "JavaScript wrapper that greatly simplifies working with GitHub's API.")
* [repos](https://www.npmjs.com/package/repos): Pull down a list of GitHub repositories for the specified user or org, and save… [more](https://github.com/jonschlinkert/repos) | [homepage](https://github.com/jonschlinkert/repos "Pull down a list of GitHub repositories for the specified user or org, and save to a local JSON file.")
* [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.")### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.
### 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
```### 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
```### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)### License
Copyright © 2017, [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 21, 2017._