#rest-api #rest

octocrate

A comprehensive GitHub REST API library based on Rust

15 releases

new 0.3.5 Apr 15, 2024
0.2.0 Apr 7, 2024
0.1.7 Mar 7, 2024
0.1.5 Aug 31, 2023
0.1.4 Jun 1, 2023

#87 in HTTP client

Download history 13/week @ 2023-12-23 3/week @ 2023-12-30 8/week @ 2024-01-06 11/week @ 2024-01-13 4/week @ 2024-01-20 2/week @ 2024-01-27 10/week @ 2024-02-03 10/week @ 2024-02-10 162/week @ 2024-02-17 71/week @ 2024-02-24 158/week @ 2024-03-02 114/week @ 2024-03-09 54/week @ 2024-03-16 19/week @ 2024-03-23 48/week @ 2024-03-30 447/week @ 2024-04-06

613 downloads per month
Used in 9 crates (3 directly)

MIT license

4MB
107K SLoC

Octocrate

octocrate is a comprehensive GitHub REST API library based on Rust.

octocrate MIT

Features

  • Fully compliant with the official documentation at GitHub REST API Documentation
  • Complete type restrictions for Body / Query parameters
  • Utilizes feature flags for individual API dependencies
  • Supports GitHub app requests for installation API
  • Supports installation access tokens and personal access tokens

Dependencies

[dependencies]
octocrate = "0.2"

Example

use octocrate::{APIConfig, Error, GithubAPI};

#[tokio::main]
async fn main() {
  let config = APIConfig::default().shared();

  let api = GithubAPI::new(&config);

  let pull_request = api
    .pulls
    .pulls
    .get_pull_request("panghu-huang", "octocrate", 1)
    .send()
    .await
    .unwrap();

  // ..
}

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.

License

This project is licensed under the MIT License.

Dependencies

~11–25MB
~456K SLoC