fw-client 0.2.6

A Flywheel API client
Documentation

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