Crates.io | spiget |
lib.rs | spiget |
version | 0.1.0 |
source | src |
created_at | 2023-07-19 21:28:14.633438 |
updated_at | 2023-07-19 21:28:14.633438 |
description | Spiget client, generated from the OpenAPI spec. |
homepage | https://github.com/domirusz24/spiget-rs |
repository | https://github.com/domirusz24/spiget-rs |
max_upload_size | |
id | 920745 |
size | 135,229 |
Spiget client, generated from the OpenAPI spec.
use spiget::SpigetClient;
use spiget::model::*;
#[tokio::main]
async fn main() {
let client = SpigetClient::from_env();
let response = client
.get_authors()
.fields("your fields")
.page(1.0)
.size(1.0)
.sort("your sort")
.await
.unwrap();
println!("{:#?}", response);
}
This example loads configuration from environment variables, specifically:
SPIGET_BASE_URL
Add this to your Cargo.toml:
[dependencies]
spiget = "0.1.0"
You can see working examples of every API call in the examples/
directory.
Contributions are welcome!
Library created with Libninja.