Skip to content

πŸ“ŒπŸ“‹ A helper class for updating a single-file Gist

License

Notifications You must be signed in to change notification settings

JasonEtco/gist-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GistBox

πŸ“ŒπŸ“‹ A helper class for updating a single-file Gist

NPM Build Status Codecov

Usage

Installation

$ npm install gist-box
const { GistBox } = require('gist-box')

API

const box = new GistBox({ id, token })
await box.update({
  filename: 'example.md',
  description: 'A new description',
  content: 'The new content'
})

You can also import some boundary numbers to use when dealing with pinned Gists:

const {
  MAX_LENGTH, // The number of characters rendered in one line
  MAX_LINES,  // The number of lines it will render
  MAX_HEIGHT, // The height of the box, in pixels
  MAX_WIDTH   // The width of the box, in pixels
} = require('gist-box')

Shoutout to @matchai for starting this trend with bird-box!

About

πŸ“ŒπŸ“‹ A helper class for updating a single-file Gist

Resources

License

Stars

Watchers

Forks

Packages

No packages published