vtiger_client/
lib.rs

1//! # Vtiger Client
2//!
3//! A Rust client library for the Vtiger CRM REST API.
4//!
5//! This crate provides a simple and ergonomic interface for interacting with
6//! Vtiger CRM instances through their REST API.
7//!
8//! ## Features
9//!
10//! - Full async/await support
11//! - Type-safe API responses
12//! - Batch export functionality
13//! - Support for JSON, JSON Lines, and CSV export formats
14//! - Comprehensive error handling
15//!
16//! ## Quick Start
17//!
18//! ```no_run
19//! use vtiger_client::Vtiger;
20//!
21//! #[tokio::main]
22//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
23//!     let vtiger = Vtiger::new(
24//!         "https://your-instance.vtiger.com",
25//!         "your_username",
26//!         "your_access_key"
27//!     );
28//!
29//!     // Get user info
30//!     let user_info = vtiger.me().await?;
31//!     println!("User info: {:?}", user_info);
32//!
33//!     // Query records
34//!     let leads = vtiger.query("SELECT * FROM Leads LIMIT 10").await?;
35//!     println!("Found {} leads", leads.result.unwrap_or_default().len());
36//!
37//!     Ok(())
38//! }
39//! ```
40
41pub mod client;
42pub mod types;
43
44// Re-export the main types for convenience
45pub use client::Vtiger;
46pub use types::{ApiError, ExportFormat, VtigerQueryResponse, VtigerResponse};