An open API service indexing awesome lists of open source software.

https://github.com/mesa-dot-dev/sdk-rust

Mesa's Rust SDK
https://github.com/mesa-dot-dev/sdk-rust

Last synced: 4 months ago
JSON representation

Mesa's Rust SDK

Awesome Lists containing this project

README

          


mesa-dev


mesa-dev


Rust SDK for the mesa.dev API.

crates.io
docs.rs
License
CI
Discord

---

## Install

```sh
cargo add mesa-dev
```

## Quick Start

```rust
use mesa_dev::apis::configuration::Configuration;
use mesa_dev::apis::repos_api;

let config = Configuration {
bearer_access_token: Some("your-token".to_string()),
..Configuration::default()
};

let repos = repos_api::get_by_org_repos(&config, "my-org", None, None).await?;
```

## Documentation

Full API reference is available on [docs.rs](https://docs.rs/mesa-dev/latest/mesa_dev/).

## Authentication

The SDK supports three authentication methods via the `Configuration` struct:

**Bearer token** (most common):

```rust
let config = Configuration {
bearer_access_token: Some("your-token".to_string()),
..Configuration::default()
};
```

**Basic auth**:

```rust
let config = Configuration {
basic_auth: Some(("username".to_string(), Some("password".to_string()))),
..Configuration::default()
};
```

**API key**:

```rust
use mesa_dev::apis::configuration::{ApiKey, Configuration};

let config = Configuration {
api_key: Some(ApiKey {
prefix: Some("Bearer".to_string()),
key: "your-api-key".to_string(),
}),
..Configuration::default()
};
```

## License

[MIT](LICENSE)