https://github.com/zxdong262/gist-client-js
Github gist api wrapper
https://github.com/zxdong262/gist-client-js
gist gist-client
Last synced: 8 months ago
JSON representation
Github gist api wrapper
- Host: GitHub
- URL: https://github.com/zxdong262/gist-client-js
- Owner: zxdong262
- License: mit
- Created: 2019-08-26T00:32:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T04:35:27.000Z (almost 3 years ago)
- Last Synced: 2025-04-28T13:14:56.898Z (8 months ago)
- Topics: gist, gist-client
- Language: TypeScript
- Size: 1.48 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Github Gist Client for JavaScript
[](https://travis-ci.com/zxdong262/gist-client-js)
Github gist API wrapper. [api docs](https://developer.github.com/v3/gists/).
## Installation
### Node.js
```bash
npm i gist-wrapper
```
## Usage
```js
import GistWrapper from 'gist-wrapper'
const gc = new GistWrapper(
GITHUB_TOKEN,
userAgentHeaderString
)
let r = await gc.get('/gists/public').catch(console.log)
expect(r.data.length > 0).toBe(true)
// quick methods
gc.getOne(gistId)
gc.create(gistData)
gc.update(gistId, gistData)
gc.delOne(gistId)
```
## Test
```bash
cp .sample.env .env
# edit .env fill your github token
npm run test
```
## Credits
Based on [Tyler](https://github.com/tylerlong)'s [https://github.com/tylerlong/ringcentral-js-concise](https://github.com/tylerlong/ringcentral-js-concise).
## License
MIT