Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fujiharuka/fetch-github-content

Node.js library of GitHub API wrapper just to fetch files
https://github.com/fujiharuka/fetch-github-content

github github-api javascript nodejs

Last synced: 5 days ago
JSON representation

Node.js library of GitHub API wrapper just to fetch files

Awesome Lists containing this project

README

        

# fetch-github-content

[![Build Status](https://travis-ci.org/FujiHaruka/fetch-github-content.svg?branch=master)](https://travis-ci.org/FujiHaruka/fetch-github-content)
[![npm version](https://badge.fury.io/js/fetch-github-content.svg)](https://badge.fury.io/js/fetch-github-content)

## Instalation

```
$ npm install fetch-github-content
```

## Usage

```js
const fetchGhContent = require('fetch-github-content')
fetchGhContent({
owner: 'FujiHaruka',
repo: 'fetch-github-content',
path: 'package.json',
token: 'xxx', // (Optional) Access token
ref: 'xxx', // (Optional) The name of the commit/branch/tag
json: true, // (Optional) if true, returns JSON.parse(content)
}).then(console.log)
```