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
//! # Vtiger Client
//!
//! A Rust client library for the Vtiger CRM REST API.
//!
//! This crate provides a simple and ergonomic interface for interacting with
//! Vtiger CRM instances through their REST API.
//!
//! ## Features
//!
//! - Full async/await support
//! - Type-safe API responses
//! - Batch export functionality
//! - Support for JSON, JSON Lines, and CSV export formats
//! - Comprehensive error handling
//!
//! ## Quick Start
//!
//! ```no_run
//! use vtiger_client::Vtiger;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let vtiger = Vtiger::new(
//! "https://your-instance.vtiger.com",
//! "your_username",
//! "your_access_key"
//! );
//!
//! // Get user info
//! let user_info = vtiger.me().await?;
//! println!("User info: {:?}", user_info);
//!
//! // Query records
//! let leads = vtiger.query("SELECT * FROM Leads LIMIT 10").await?;
//! println!("Found {} leads", leads.result.unwrap_or_default().len());
//!
//! Ok(())
//! }
//! ```
// Re-export the main types for convenience
pub use Vtiger;
pub use ;