Skip to content

fussybeaver/roctokit

Repository files navigation

license GitHub workflow

Roctokit: A Rust Client Library for the GitHub v3 API

Roctokit is a Rust library providing high-level client interfaces for interacting with the GitHub REST API. Built on models and endpoints generated from GitHub's OpenAPI specification, it offers an ergonomic and efficient way to work with GitHub's v3 API.

Roctokit includes stock client implementations supporting both synchronous and asynchronous HTTP clients, as well as WebAssembly compatibility. Additionally, it allows for custom client implementations, enabling advanced use cases such as handling GitHub’s rate limits or building streams from paginated results by extending its adapter subsystem.

Features

  • Multi-client support: Use the built-in HTTP clients or implement your own.
  • WebAssembly compatibility: Works seamlessly in browser environments.
  • Extensible adapters: Customise request handling for rate limiting, pagination, or alternative transport layers.

Supported Client Implementations

Roctokit provides out-of-the-box support for the following HTTP clients:

  • reqwest: Enables asynchronous requests via the Reqwest client.
  • ureq: Provides synchronous requests using the Ureq client.
  • wasm: Uses the browser's Fetch API for WebAssembly environments.

Repository Structure

This repository is divided into two main components:

  • roctogen: A Rust library that provides low-level API bindings and models generated from the GitHub OpenAPI specification.
  • roctokit: A higher-level client built on top of roctogen, offering more user-friendly abstractions for interacting with the GitHub API.

Getting Started

To start using Roctokit, begin with a basic example provided in the roctogen README. Once familiar with the basics, explore the endpoint documentation to determine which GitHub API endpoints are available. For more advanced use cases, consider implementing a custom adapter, which covered in the roctokit README.

License

This project is licensed under the Apache 2.0 License.

About

A rust client library for the GitHub v3 API

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •