1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Roblox Cloud API integration module
//!
//! This module provides functionality for syncing translations with Roblox Cloud
//! Localization Tables via the Open Cloud API.
//!
//! # Overview
//!
//! The cloud sync feature enables bidirectional synchronization between local
//! translation files and Roblox Cloud Localization Tables. This allows you to:
//!
//! - Upload local translations to Roblox Cloud
//! - Download translations from Roblox Cloud
//! - Synchronize with merge strategies (overwrite, merge, skip-conflicts)
//! - Handle rate limiting and retries automatically
//! - Resolve conflicts between local and cloud versions
//!
//! # Authentication
//!
//! Authentication requires a Roblox Cloud API key. Set it via:
//!
//! 1. Environment variable (recommended):
//! ```bash
//! export ROBLOX_CLOUD_API_KEY=your_api_key_here
//! ```
//!
//! 2. Configuration file (slang-roblox.yaml):
//! ```yaml
//! cloud:
//! api_key: your_api_key_here
//! ```
//!
//! Get your API key from: <https://create.roblox.com/credentials>
//!
//! # Example Usage
//!
//! ```no_run
//! use roblox_slang::roblox::{AuthConfig, RobloxCloudClient, SyncOrchestrator};
//! use roblox_slang::config::Config;
//!
//! # async fn example() -> anyhow::Result<()> {
//! // Load configuration
//! let config = Config::default();
//!
//! // Load authentication
//! let auth = AuthConfig::load(&config)?;
//!
//! // Create client
//! let client = RobloxCloudClient::new(auth.api_key)?;
//!
//! // Create orchestrator
//! let orchestrator = SyncOrchestrator::new(client, config);
//!
//! // Upload translations
//! let stats = orchestrator.upload("table_id_here", false).await?;
//! println!("Uploaded {} entries", stats.entries_uploaded);
//! # Ok(())
//! # }
//! ```
// Re-export commonly used types
pub use AuthConfig;
pub use RobloxCloudClient;
pub use MergeStrategy;
pub use SyncOrchestrator;