Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/fujiharuka/fetch-github-content
- Owner: FujiHaruka
- Created: 2018-07-13T05:23:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T13:59:41.000Z (5 months ago)
- Last Synced: 2024-10-13T06:22:03.336Z (about 1 month ago)
- Topics: github, github-api, javascript, nodejs
- Language: JavaScript
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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)
```