1.0.0 • Published 6 years ago

octokit-rest-plugin-add-endpoints v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

octokit-rest-plugin-add-endpoints

@octokit/rest plugin to add endpoint methods based on a routes.json file

Usage

const octokit = require('@octokit/rest')()
octokit.plugin(require('octokit-rest-plugin-add-endpoints'))

octokit.addEndpoints(require('./my-routes.json'))
octokit.repos.newEndpointGet({
  owner: 'octokit',
  repo: 'welcome',
  foo: 'bar'
})

The my-routes.json file has to follow the format of @octokit/rest/lib/routes.json.

License

MIT