atproto_client/lib.rs
1//! # AT Protocol HTTP Client Library
2//!
3//! Comprehensive HTTP client library for AT Protocol services with support for multiple
4//! authentication methods and XRPC protocol operations. Provides both low-level HTTP
5//! client functionality and high-level AT Protocol specific operations.
6//!
7//! ## Key Features
8//!
9//! - **Multiple Authentication Methods**: DPoP, Bearer tokens, and session-based authentication
10//! - **XRPC Protocol Support**: Native support for AT Protocol's XRPC communication protocol
11//! - **Repository Operations**: Complete client for AT Protocol repository operations
12//! - **Session Management**: Authentication session creation, refresh, and validation
13//! - **Error Handling**: Structured error types with detailed context for debugging
14//! - **URL Utilities**: Helper functions for AT Protocol URL construction and validation
15//!
16//! ## Architecture
17//!
18//! The library provides both raw HTTP client capabilities and AT Protocol specific abstractions:
19//!
20//! - **`client`**: Core HTTP client with authentication middleware support
21//! - **`url`**: URL construction and validation utilities for AT Protocol endpoints
22//! - **`com::atproto::repo`**: Repository operations for record management
23//! - **`com::atproto::server`**: Server operations for authentication and session management
24//! - **`errors`**: Structured error types for HTTP and authentication failures
25//!
26//! ## Command-Line Tools
27//!
28//! When built with the `clap` feature, provides XRPC client tools:
29//!
30//! - **`atproto-client-dpop`**: Make authenticated XRPC calls using DPoP (Demonstration of Proof-of-Possession) tokens
31//! - **`atproto-client-auth`**: Create and refresh authentication sessions with AT Protocol services
32//! - **`atproto-client-app-password`**: Make authenticated XRPC calls using application-specific Bearer tokens
33
34#![forbid(unsafe_code)]
35#![warn(missing_docs)]
36
37pub mod client;
38pub mod errors;
39pub mod url;
40
41mod com_atproto_repo;
42mod com_atproto_server;
43
44/// AT Protocol namespace modules.
45pub mod com {
46 /// AT Protocol core modules.
47 pub mod atproto {
48 /// Repository operations for AT Protocol records.
49 pub mod repo {
50 pub use crate::com_atproto_repo::*;
51 }
52 /// Server operations for AT Protocol authentication and session management.
53 pub mod server {
54 pub use crate::com_atproto_server::*;
55 }
56 }
57}