backlog_client/
lib.rs

1mod client;
2mod types;
3
4pub use client::{BacklogClient, BacklogError, BacklogResult};
5pub use types::*;
6
7// Re-export commonly used types for convenience
8pub use serde_json::Value as JsonValue;
9
10#[cfg(test)]
11mod tests {
12    use super::*;
13
14    #[test]
15    fn test_client_creation() {
16        let client = BacklogClient::new("https://test.backlog.com", "test_api_key");
17        // Just test that we can create a client without panicking
18        // We'll test with a simple format check since fields are private
19        let client2 = BacklogClient::new("https://example.backlog.com", "another_key");
20        // If we got here without panicking, client creation works
21        drop(client);
22        drop(client2);
23    }
24
25    #[test]
26    fn test_client_with_custom_client() {
27        let client = BacklogClient::with_client(
28            "https://test.backlog.com",
29            "test_key",
30            reqwest::Client::new(),
31        );
32        // Test that custom client creation works
33        drop(client);
34    }
35}