Crate rsdo

Crate rsdo 

Source
Expand description

§rsdo - DigitalOcean Rust Client

A Rust client library for the DigitalOcean API, generated from the official OpenAPI specification.

§Quick Start

use rsdo::Client;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a client with your DigitalOcean personal access token
    let client = Client::from_token("your-digitalocean-token");

    // List your droplets (with required parameters)
    let droplets = client.droplets_list(None, None, None, None, None).await?;
    println!("Found {} droplets", droplets.into_inner().droplets.len());

    Ok(())
}

§Authentication

This client uses DigitalOcean’s Personal Access Token (PAT) for authentication. You can create a token in the DigitalOcean Control Panel.

§Features

  • Async/await support with reqwest and tokio
  • Strongly typed API responses
  • Generated from the official DigitalOcean OpenAPI specification
  • Automatic serialization/deserialization with serde
  • Comprehensive error handling

Modules§

types
Types module with common DigitalOcean API types

Structs§

Client
Enhanced client implementation with authentication support
ErrorResponse
Standard error response from DigitalOcean API
Links
Pagination links structure
Pages
Page navigation links
Response
Generic response wrapper used by DigitalOcean API
ResponseValue
Response value wrapper with additional metadata

Enums§

Error
Comprehensive error types for DigitalOcean API