Cloudreve API
A Rust library for interacting with the Cloudreve API. This library provides asynchronous access to all major Cloudreve API endpoints with proper error handling and type safety.
Features
- Full async/await support
- Comprehensive API coverage for Cloudreve v4
- Type-safe request and response structures
- Built-in error handling
- Easy authentication management
- Support for all major API categories:
- Session and authentication
- User management
- File operations
- Sharing
- Workflow management
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Or use cargo-edit:
Usage
Basic Setup
use ;
async
Authentication
use ;
async
File Operations
use ;
async
API Coverage
This library covers the following API categories:
- Session Management: Login, logout, token refresh, 2FA
- User Management: Signup, profile management, preferences, storage capacity
- File Operations: List, create, rename, move, delete files
- Sharing: Create, list, edit, delete share links
- Workflow: Remote downloads, task management, archive creation
Error Handling
All API calls return a Result<T, Error> type. Common error types include:
Error::Http- Network/http related errorsError::Json- Serialization/deserialization errorsError::Api- API error responses with code and messageError::Auth- Authentication failuresError::InvalidResponse- Malformed responses
License
This project is licensed under the MIT License.