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