act/pkg/runner/testdata/actions/node16/node_modules/@octokit/plugin-rest-endpoint-methods
dependabot[bot] 3939f48e6d
build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931)
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.1.0 to 7.2.1.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oxsecurity/megalinter/compare/v7.1.0...v7.2.1)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 13:37:31 +00:00
..
dist-node build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931) 2023-08-08 13:37:31 +00:00
dist-src build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931) 2023-08-08 13:37:31 +00:00
dist-types build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931) 2023-08-08 13:37:31 +00:00
dist-web build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931) 2023-08-08 13:37:31 +00:00
LICENSE build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931) 2023-08-08 13:37:31 +00:00
package.json build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931) 2023-08-08 13:37:31 +00:00
README.md build(deps): bump megalinter/megalinter from 7.1.0 to 7.2.1 (#1931) 2023-08-08 13:37:31 +00:00

plugin-rest-endpoint-methods.js

Octokit plugin adding one method for all of api.github.com REST API endpoints

@latest Build Status

Usage

Browsers

Load @octokit/plugin-rest-endpoint-methods and @octokit/core (or core-compatible module) directly from cdn.skypack.dev

<script type="module">
  import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
  import { restEndpointMethods } from "https://cdn.skypack.dev/@octokit/plugin-rest-endpoint-methods";
</script>
Node

Install with npm install @octokit/core @octokit/plugin-rest-endpoint-methods. Optionally replace @octokit/core with a compatible module

const { Octokit } = require("@octokit/core");
const {
  restEndpointMethods,
} = require("@octokit/plugin-rest-endpoint-methods");
const MyOctokit = Octokit.plugin(restEndpointMethods);
const octokit = new MyOctokit({ auth: "secret123" });

// https://developer.github.com/v3/users/#get-the-authenticated-user
octokit.rest.users.getAuthenticated();

There is one method for each REST API endpoint documented at https://developer.github.com/v3. All endpoint methods are documented in the docs/ folder, e.g. docs/users/getAuthenticated.md

TypeScript

Parameter and response types for all endpoint methods exported as { RestEndpointMethodTypes }.

Example

import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";

type UpdateLabelParameters = RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"];
type UpdateLabelResponse = RestEndpointMethodTypes["issues"]["updateLabel"]["response"];

In order to get types beyond parameters and responses, check out @octokit/openapi-types, which is a direct transpliation from GitHub's official OpenAPI specification.

Contributing

See CONTRIBUTING.md

License

MIT