Crate vtiger_client

Crate vtiger_client 

Source
Expand description

§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

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-exports§

pub use client::Vtiger;
pub use types::ApiError;
pub use types::ExportFormat;
pub use types::VtigerQueryResponse;
pub use types::VtigerResponse;

Modules§

client
types