GitHunt
MI

mike182uk/fetch-gists

Fetch all of your gists from GitHub

⚠️ 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.

Languages

JavaScript100.0%

Contributors

MIT License
Created January 9, 2016
Updated November 3, 2024