Expand description
Generated Rust client for the Infrawrench API.
API version: 1.121.0 Default base URL: https://app.infrawrench.com Operations: 943
use infrawrench_sdk::{APIV1Client, AccountsListParams, ClientConfig, Error};
let client = APIV1Client::new(ClientConfig::new().api_key("iw_…").org_id("org"))?;
match client.accounts().list(AccountsListParams::new()).await {
Ok(accounts) => println!("{} accounts", accounts.len()),
Err(error) => eprintln!("{:?} {error}", error.status()),
}Re-exports§
Modules§
- client
- The dotted call tree.
- models
- Every type the API sends or receives.
- params
- One struct per operation, holding its path parameters, query parameters and request body.
Structs§
- ApiError
- A non-2xx response, with everything needed to branch on it.
- Client
Config - How to reach the API. Every field has a working default except the API key.
- File
Upload - File bytes bound for a
multipart/form-datafield. - Request
Spec - A single HTTP call, as assembled by the generated namespace methods.
- Transport
- Request plumbing shared by every namespace.
Enums§
- Accept
- What the endpoint returns, which decides both the
Acceptheader and how the response body is read back. - Error
- Everything a call can fail with.
- Form
Value - One field of a
multipart/form-databody.
Traits§
- Into
Multipart - A model that knows how to become a multipart body. Implemented by the
generator for exactly those schemas the spec sends as
multipart/form-data.
Functions§
- form_
text - Render a value as a
multipart/form-datatext field. Used only by the generatedIntoMultipartimpls.