Quickstart

Clone an SDK, set your credentials and make a first request against the GitHub REST API.

  1. 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.

    bash
    gh repo clone octri-dev/github-typescript-showcase-sdk
    cd github-typescript-showcase-sdk
    ./scripts/test
  2. Set your credentials

    This request needs no credential in the quickstart. See Authentication for the schemes the other operations accept.

  3. Make a request

    The example below calls client.search.labels (GET /search/labels) with example values for its required arguments.

    ts
    import { 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);