Crates.io | octoapp |
lib.rs | octoapp |
version | |
source | src |
created_at | 2024-08-07 01:19:17.462228 |
updated_at | 2024-11-01 09:43:47.045371 |
description | Octoapp is a Rust library for building GitHub Apps |
homepage | |
repository | https://github.com/42ByteLabs/octoapp |
max_upload_size | |
id | 1327941 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Octoapp is a Rust library for building GitHub Apps. It provides a simple interface for creating GitHub Apps and handling webhook events.
octocrab
for interacting with the GitHub API.rocket
web framework for handling incoming webhook events.
rocket
Run the following command to add octoapp
to your project:
cargo add octoapp
use anyhow::Result;
use octoapp::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
// [optional] Load .env file if it exists
// dotenvy::dotenv().ok();
// Load the configuration (from environment variables)
// Or, you can set the configuration manually
let config = OctoAppConfig::init()
.app_name("My App")
.app_id(12345)
.client_id("client_id")
.client_secret("client_secret")
.webhook_secret("webhook_secret")
.build()
.expect("Failed to build OctoAppConfig");
println!("{}", config);
// Create a new Octocrab instance
let octocrab = config.octocrab();
if let Ok(client) = octocrab {
let repos = client.issues("42ByteLabs", "octoapp")
.list()
.creator("GeekMasher")
.send()
.await?;
}
Ok(())
}
You can find the documentation for this project on docs.rs.
Please create GitHub Issues if there are bugs or feature requests.
This project uses Semantic Versioning (v2) and with major releases, breaking changes will occur.
This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.