Skip to main content

Crate qrz_xml

Crate qrz_xml 

Source
Expand description

§QRZ.com XML API Client

A safe, async Rust client library for the QRZ.com XML API.

This library provides a complete interface to QRZ.com’s XML subscription data service, including callsign lookups, DXCC entity information, and biography data retrieval.

§Features

  • Safe & Type-safe: All API responses are parsed into strongly-typed Rust structs
  • Async: Built on tokio and reqwest for async/await support
  • Session Management: Automatic session handling with intelligent re-authentication
  • Error Handling: Comprehensive error types for all failure modes
  • Rate Limiting: Respects QRZ.com’s usage guidelines
  • Versioned API: Support for QRZ’s versioned XML interface

§Quick Start

use qrz_xml::{QrzXmlClient, ApiVersion};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = QrzXmlClient::new("your_username", "your_password", ApiVersion::Current)?;
     
    // Look up a callsign
    let callsign_info = client.lookup_callsign("AA7BQ").await?;
    println!("Found: {} - {}", callsign_info.call, callsign_info.fname.unwrap_or_default());
     
    // Look up DXCC entity
    let dxcc_info = client.lookup_dxcc_entity(291).await?;
    println!("DXCC 291: {}", dxcc_info.name);
     
    Ok(())
}

§Authentication

You need a valid QRZ.com username and password. While any QRZ user can authenticate, most features require an active QRZ Logbook Data subscription.

Re-exports§

pub use client::QrzXmlClient;
pub use error::QrzXmlError;
pub use error::Result;
pub use types::ApiVersion;
pub use types::BiographyData;
pub use types::CallsignInfo;
pub use types::DxccInfo;
pub use types::SessionInfo;

Modules§

client
QRZ.com XML API client implementation.
error
Error types for the QRZ client library.
types
Type definitions for QRZ API responses.

Structs§

DateTime
Re-export commonly used types from chrono for convenience ISO 8601 combined date and time with time zone.
Utc
Re-export commonly used types from chrono for convenience The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).

Constants§

DEFAULT_BASE_URL
The default base URL for QRZ’s XML API
DEFAULT_USER_AGENT
Default user agent string for requests