wishthis/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js

19 lines
539 B
JavaScript
Raw Normal View History

import ENDPOINTS from "./generated/endpoints";
2022-01-21 08:28:41 +00:00
import { VERSION } from "./version";
import { endpointsToMethods } from "./endpoints-to-methods";
2022-01-21 08:28:41 +00:00
export function restEndpointMethods(octokit) {
const api = endpointsToMethods(octokit, ENDPOINTS);
return {
rest: api,
};
2022-01-21 08:28:41 +00:00
}
restEndpointMethods.VERSION = VERSION;
export function legacyRestEndpointMethods(octokit) {
const api = endpointsToMethods(octokit, ENDPOINTS);
return {
...api,
rest: api,
};
}
legacyRestEndpointMethods.VERSION = VERSION;