fw-client

Crates.iofw-client
lib.rsfw-client
version0.2.6
created_at2025-06-23 23:05:42.339306+00
updated_at2025-06-23 23:05:42.339306+00
descriptionA Flywheel API client
homepagehttps://gitlab.com/flywheel-io/scientific-solutions/lib/fw-client-rs
repository
max_upload_size
id1723660
size91,399
(flywheel-rust-bot)

documentation

https://docs.rs/fw-client

README

fw-client

This library provides an API client to Flywheel for the Rust programming language

This library is a fairly thin wrapper around the rust reqwest ecosystem.

The FWClient struct provides a simple API client, but also

Getting started

You can add this library as dependency with cargo add fw-client

Usage

The FWClientBuilder can be used to create the FWClient

use fw_client::{FWClientBuilder,FWClient};

let client = FWClientBuilder::new("flywheel.site:my-api-key".parse().unwrap())
    .client_name("My cool app")
    .client_version("0.1.0")
    .build()
    .expect("Could not build FWClient");

let user_info = client
    .get("/api/users/self")
    .send()
    .await
    .expect("Request failed")
    .json::<serde_json::Value>()
    .await
    .expect("Failed to parse response as JSON");

Minimum Supported Rust Version (MSRV)

Minimum tested rust version is 1.82.0

Commit count: 0

cargo fmt