mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
.. | ||
dist-node | ||
dist-src | ||
dist-types | ||
dist-web | ||
LICENSE | ||
package.json | ||
README.md |
plugin-rest-endpoint-methods.js
Octokit plugin adding one method for all of api.github.com REST API endpoints
Usage
Browsers |
Load
|
---|---|
Node |
Install with
|
const MyOctokit = Octokit.plugin(restEndpointMethods);
const octokit = new MyOctokit({ auth: "secret123" });
// https://developer.github.com/v3/users/#get-the-authenticated-user
octokit.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/rest-endpoint-methods";
type UpdateLabelParameters = RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"];
type UpdateLabelResponse = RestEndpointMethodTypes["issues"]["updateLabel"]["response"];
Contributing
See CONTRIBUTING.md