2020-06-06 22:11:37 +08:00
|
|
|
import ENDPOINTS from "./generated/endpoints";
|
2020-03-02 21:16:42 +08:00
|
|
|
import { VERSION } from "./version";
|
2020-06-06 22:11:37 +08:00
|
|
|
import { endpointsToMethods } from "./endpoints-to-methods";
|
2020-03-02 21:16:42 +08:00
|
|
|
/**
|
|
|
|
* This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary
|
|
|
|
* goal is to rebuild @octokit/rest on top of @octokit/core. Once that is
|
|
|
|
* done, we will remove the registerEndpoints methods and return the methods
|
|
|
|
* directly as with the other plugins. At that point we will also remove the
|
|
|
|
* legacy workarounds and deprecations.
|
|
|
|
*
|
|
|
|
* See the plan at
|
|
|
|
* https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1
|
|
|
|
*/
|
|
|
|
export function restEndpointMethods(octokit) {
|
2020-06-06 22:11:37 +08:00
|
|
|
return endpointsToMethods(octokit, ENDPOINTS);
|
2020-03-02 21:16:42 +08:00
|
|
|
}
|
|
|
|
restEndpointMethods.VERSION = VERSION;
|