steam-client-rs 0.1.2

Steam client for Rust - Individual and Anonymous user account types
Documentation
//! Steam client for Rust.
//!
//! This crate provides a Steam client for individual and anonymous user account
//! types.
//!
//! # Example
//!
//! ```rust,no_run
//! use steam_client::{AuthEvent, LogOnDetails, SteamClient, SteamEvent, TokenStore};
//!
//! #[tokio::main]
//! async fn main() {
//!     let mut client = SteamClient::new(Default::default());
//!     let token_store = TokenStore::new("steam_tokens.json");
//!
//!     // Load previous session if available
//!     let logon_details = token_store.load(None).unwrap_or_default();
//!     client.log_on(logon_details).await.unwrap();
//!
//!     // In your event loop, save the token when refreshed
//!     // while let Some(event) = client.next().await {
//!     //     match event {
//!     //         SteamEvent::Auth(AuthEvent::RefreshToken(token)) => {
//!     //             // Use actual account name and steam_id from client state or event
//!     //             // token_store.save("account_name".into(), token, 0).unwrap();
//!     //         }
//!     //         _ => {}
//!     //     }
//!     // }
//! }
//! ```

// Core modules (at root level)
mod connection;
mod error;
mod options;
mod protocol;
mod types;

// Organized submodules
pub mod cache;
pub mod client;
pub mod internal;
pub mod persistence;
pub mod services;
pub mod utils;

// ============================================================================
// Public Re-exports
// ============================================================================

// Core types
// Client
pub use client::{AccountEvent, AppChange, AppInfoData, AppsEvent, AuthEvent, CSGOEvent, ChatEvent, ConnectionEvent, ContentEvent, CsgoClientHello, CsgoCommendation, CsgoPartyEntry, CsgoRanking, CsgoWelcome, FriendEntry, FriendsEvent, LicenseEntry, MessageHandler, MockHandles, NotificationsEvent, PackageChange, PackageInfoData, SteamClient, SteamClientBuilder, SteamEvent, SteamEventStream, SystemEvent, UserPersona};
pub use error::SteamError;
// Internal (exposed for testing)
pub use internal::{HeartbeatManager, JobManager, JobResponse, MessageSender, MockMessageSender, ReconnectManager, ReconnectState, SentMessage, SessionInfo};
pub use options::{HeartbeatOptions, ReconnectConfig, SteamOptions};
pub use persistence::TokenStore;
// Services
pub use services::{
    // Account
    AccountInfo,
    AccountLimitations,
    // Friends
    AddFriendResult,
    // Apps
    AppInfo,
    AppInfoRequest,
    // Economy
    AssetClass,
    AssetClassInfo,
    // App auth
    AuthSessionResult,
    AuthSessionTicket,
    // Family sharing
    AuthorizedBorrower,
    AuthorizedDevice,
    // CDN
    CdnAuthToken,
    // Chat
    ChatMessage,
    // Chat room
    ChatRole,
    ChatRoom,
    ChatRoomGroup,
    ChatRoomMember,
    ChatRoomMessage,
    ContentServer,
    DepotManifest,
    EmailInfo,
    Emoticon,
    EquippedProfileItems,
    FileChunk,
    Friend,
    FriendMessageSession,
    FriendsGroup,
    // GC
    GCMessage,
    GCProtoHeader,
    GCSendOptions,
    // Game servers
    GameServer,
    HistoryMessage,
    // Idler
    IdlerHandle,
    InviteLinkInfo,
    ManifestFile,
    // Notifications
    Notification,
    NotificationType,
    OwnedApp,
    OwnedProfileItems,
    PackageInfo,
    PackageInfoRequest,
    PrivacySettings,
    ProfileItem,
    // Published files
    PublishedFileDetails,
    // Rich presence
    RichPresenceData,
    RolePermissions,
    SendMessageResult,
    SteamGuardDetails,
    // Trading
    TradeRestrictions,
    TradeUrl,
    // Two-factor
    TwoFactorSecrets,
    VacBans,
    VoteData,
    WalletInfo,
};
// Re-export commonly used types from other crates
pub use steam_enums::{EAccountType, EAppType, EChatEntryType, EClanRelationship, ECurrencyCode, EFriendRelationship, ELicenseType, EPaymentMethod, EPersonaState, EPlatformType, EResult, EServerType, EUniverse};
pub use steamid::SteamID;
pub use types::{LogOnDetails, LogOnResponse};
// Utils (exposed for advanced usage)
pub use utils::{Clock, HttpClient, HttpResponse, MockClock, MockHttpClient, MockRequest, MockRng, ReqwestHttpClient, Rng, SystemClock, ThreadRng};