Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdong262 committed Aug 26, 2019
1 parent 984c0f2 commit b221261
Show file tree
Hide file tree
Showing 12 changed files with 9,576 additions and 59 deletions.
12 changes: 12 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "10.10"
}
}
]
]
}
63 changes: 6 additions & 57 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,61 +1,10 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http:https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity
dist/

# dotenv environment variables file
.env
.env.*
yarn-error.log

# next.js build output
.next
test/index.html
test.pdf
/temp/
19 changes: 19 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/build/
/test/
/tests/
.babelrc
.eslintignore
.gitignore
db.sqlite
/temp/
/example-bots/
/example-skills/
/screenshots/
/*.js
.sample.env
.env
.editorconfig
.travis.yml
webpack.config.babel.js
yarn.lock
/bin/
5 changes: 5 additions & 0 deletions .sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# github token
GITHUB_TOKEN=



13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
matrix:
include:
- os: linux
language: node_js
node_js: "10"
dist: xenial

script:
- npm run test

branches:
- release
- test
50 changes: 48 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,48 @@
# gist-client-js
Github gist api wrapper
# Github Gist Client for JavaScript

[![Build Status](https://travis-ci.org/zxdong262/gist-client-js.svg?branch=release)](https://travis-ci.org/zxdong262/ringcentral-engage-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 RingCentralEnage(
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
10 changes: 10 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
cd `dirname $0`
cd ..
git co master
git pull
git pull
git delete-branch release
git create-branch release
git push origin release -u
git co -
Loading

0 comments on commit b221261

Please sign in to comment.