Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JasonEtco/gist-box
📌📋 A helper class for updating a single-file Gist
https://github.com/JasonEtco/gist-box
Last synced: 6 days ago
JSON representation
📌📋 A helper class for updating a single-file Gist
- Host: GitHub
- URL: https://github.com/JasonEtco/gist-box
- Owner: JasonEtco
- License: mit
- Created: 2019-03-18T04:39:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:43:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T01:55:55.604Z (12 days ago)
- Language: TypeScript
- Homepage:
- Size: 1.05 MB
- Stars: 85
- Watchers: 3
- Forks: 4
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pinned-gists - gist-box - A helper class for updating single-file Gists. (Resources)
- jimsghstars - JasonEtco/gist-box - 📌📋 A helper class for updating a single-file Gist (TypeScript)
README
GistBox
📌📋 A helper class for updating a single-file Gist
## Usage
### Installation
```sh
$ npm install gist-box
``````js
const { GistBox } = require('gist-box')
```### API
```js
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:
```js
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](https://github.com/matchai) for starting this trend with [bird-box](https://github.com/matchai/bird-box)!