Socket
Socket
Sign inDemoInstall

fetch-gists

Package Overview
Dependencies
30
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fetch-gists

Fetch all of your Gists from GitHub


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
4.43 MB
Created
Weekly downloads
 

Changelog

Source

5.0.0

  • Drop support for Node.js < 12.0.0

Readme

Source

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.

Keywords

FAQs

Last updated on 10 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc