#client #generated #spec #open-api #model #sorting #fields

spiget

Spiget client, generated from the OpenAPI spec

1 unstable release

0.1.0 Jul 19, 2023

#95 in #fields

Download history 4/week @ 2024-02-26 120/week @ 2024-03-25 15/week @ 2024-04-01

135 downloads per month

MIT license

89KB
2K SLoC

Stars Build Status Downloads Crates.io

Spiget client, generated from the OpenAPI spec.

Usage

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

Installation

Add this to your Cargo.toml:

[dependencies]
spiget = "0.1.0"

Documentation

You can see working examples of every API call in the examples/ directory.

Contributing

Contributions are welcome!

Library created with Libninja.

Dependencies

~10–26MB
~414K SLoC