@octokit-next/types-rest-api-github.ae-compatible
v2.8.0
Published
Types for GITHUB.AE (compatible) REST API requests and responses
Downloads
19
Readme
@octokit-next/types-rest-api-github.ae-compatible
Types for GITHUB.AE (compatible) REST API requests and responses
🚫⚠️ This package is part of an experimental Octokit SDK for testing purpose only - DO NOT USE
The goal for this package is to enable developers to build code that will work in both environments: github.com and GITHUB.AE. Only endpoints and properties that exist in both have types by default.
The version can be overwritten on a per-request basis as needed.
Usage
const octokit = new Octokit({
version: "github.ae-compatible",
});
const response = await octokit.request("GET /");
The routes suggested for octokit.request(route)
are only the ones that exist for version: "github.com"
and have no overrides for version: "github.ae"
. The same is true for response.headers
.
To override the version specified in the constructor it can be set using the request.version
option
const ghesOnlyResponse = await octokit.request("GET /admins/users", {
request: {
version: "github.ae",
},
});