vtiger_client/
lib.rs

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