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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//! A complete, async-first Rust client for the AnkiConnect API.
//!
//! This crate provides type-safe access to all AnkiConnect actions, allowing you
//! to programmatically interact with Anki from Rust applications.
//!
//! # Quick Start
//!
//! ```no_run
//! use ankit::AnkiClient;
//!
//! # async fn example() -> ankit::Result<()> {
//! // Create a client with default settings (localhost:8765)
//! let client = AnkiClient::new();
//!
//! // Check that AnkiConnect is running
//! let version = client.misc().version().await?;
//! println!("AnkiConnect version: {}", version);
//! # Ok(())
//! # }
//! ```
//!
//! # Client Configuration
//!
//! Use the builder pattern for custom configuration:
//!
//! ```no_run
//! use std::time::Duration;
//! use ankit::AnkiClient;
//!
//! let client = AnkiClient::builder()
//! .url("http://localhost:8765")
//! .api_key("your-api-key")
//! .timeout(Duration::from_secs(60))
//! .build();
//! ```
//!
//! # Action Groups
//!
//! Operations are organized into groups accessible from the client:
//!
//! - [`AnkiClient::cards()`] - Find, inspect, suspend, and answer cards
//! - [`AnkiClient::decks()`] - Create, delete, and configure decks
//! - [`AnkiClient::gui()`] - Control Anki's graphical interface
//! - [`AnkiClient::media()`] - Store, retrieve, and manage media files
//! - [`AnkiClient::models()`] - Manage note types, fields, and templates
//! - [`AnkiClient::notes()`] - Add, find, update, and delete notes
//! - [`AnkiClient::statistics()`] - Review history and collection statistics
//! - [`AnkiClient::misc()`] - Version, sync, profiles, and other miscellaneous operations
//!
//! # Requirements
//!
//! - Anki must be running with the [AnkiConnect](https://ankiweb.net/shared/info/2055492159) add-on installed
//! - By default, the client connects to `http://127.0.0.1:8765`
//!
//! # Query Builder
//!
//! Use the [`QueryBuilder`] for type-safe query construction:
//!
//! ```
//! use ankit::QueryBuilder;
//!
//! let query = QueryBuilder::new()
//! .deck("Japanese")
//! .is_due()
//! .not_suspended()
//! .lapses_gte(3)
//! .build();
//! ```
pub use ;
pub use ;
pub use ;
// Re-export types from actions module
pub use ;
// Re-export query builder
pub use ;