Quickstart
Clone an SDK, set your credentials and make a first request against the GitHub REST API.
- Clone an SDK
Every SDK is published as source on GitHub. Clone the one for your language and run its test script; its README lists the toolchain it needs.
bashgh repo clone octri-dev/github-typescript-showcase-sdk cd github-typescript-showcase-sdk ./scripts/test - Set your credentials
This request needs no credential in the quickstart. See Authentication for the schemes the other operations accept.
- Make a request
The example below calls
client.search.labels(GET /search/labels) with example values for its required arguments.tsimport { GitHubV3REST } from "github"; async function main() { const client = new GitHubV3REST({ baseUrl: "https://api.github.com", }); const result = await client.search.labels({ repositoryId: 1, q: "q" }); console.log(result); } main().catch(console.error);