Skip to content

How to determine which GitHub REST API operations aren't in rest.js #2032

Answered by gr2m
rachmari asked this question in Q&A
Discussion options

You must be logged in to vote

The examples in the docs are not using @octokit/rest, but @octokit/core. All current and future endpoints are automatically supported by @octokit/core, it's just a slight wrapper around a generic request method.

@octokit/rest adds methods for each endpoint, which is just for convenience. Because it adds quite a lot of code, @octokit/rest does not include the enterprise methods. Instead, you can compose your own Octokit with @octokit/core and then the plugins you need:

  • github.com/octokit/plugin-rest-endpoint-methods.js (which @octokit/rest is using, see composition here)
  • github.com/octokit/plugin-enterprise-server.js
  • github.com/octokit/plugin-enterprise-cloud.js

so tl;dr, I think we are …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rachmari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants