md_api
md_api is an asynchronous Rust client for the MediaFire API, allowing you to:
- Fetch file metadata
- Fetch folder metadata
- Fetch paginated folder contents
- Extract file and folder keys from MediaFire URLs
- Handle rate-limited requests with automatic retries
Built with tokio, reqwest, serde, and regex.
Features
- Async API requests using Tokio runtime
- Automatic retry with exponential backoff for rate-limited endpoints
- Support for proxies
- Extract keys from MediaFire URLs (files and folders)
- Fetch both files and subfolders in a single request
Installation
Add this to your Cargo.toml:
= "0.1"
Usage Example
use Api;
use tokio;
async
API Highlights
Api::new(max_retries: u64)– Create a new client.Api::with_proxies(proxies: Vec<String>)– Configure HTTP proxies.Api::get_info(&Key)– Fetch file or folder metadata.Api::get_folder_content(&Key, ContentType, chunk)– Fetch folder content paginated.Api::get_folder_and_file_content(&Key, chunk)– Fetch both files and folders in a single call.Api::extract_keys_from_url(&Vec<String>)– Extract MediaFire keys from URLs.
Requirements
- Rust 1.75+
- Tokio runtime
License
Licensed under MIT