mike182uk / fetch-gists

Fetch all of your gists from GitHub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚠️ This project is no longer maintained

fetch-gists

Version Build Status Coveralls npm License

Fetch all of your gists from GitHub.

fetch-gists will handle all of the API calls needed to retrieve all of your gists from GitHub. This includes navigating the paginated results.

Prerequisites

  • GitHub account (duh!)
  • GitHub access token with the gist scope enabled

Installation

npm install --save fetch-gists

Usage

const fetchGists = require('fetch-gists')

const accessToken = '<your-github-access-token>'

try {
  const gists = await fetchGists(accessToken)

  // gists successfully retrieved
} catch (err) {
  // something went wrong
}

fetchGists will return a promise. The promise will resolve once all gists for the account have been retrieved. Any errors that occur during the retrieval of the gists will cause the promise to reject.

About

Fetch all of your gists from GitHub

License:MIT License


Languages

Language:JavaScript 100.0%