Skip to content

Track your packages from all over the world. Supports logicsitcs from DHL, UPS, FedEx, USPS, and more.

Notifications You must be signed in to change notification settings

shahen94/logistics-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Logistics API

Supported APIs

  • DHL (✅)
  • UPS (🕒)
  • Fedex (🕒)

Usage

With Blocking I/O

use logistics_api::DHL;

fn main() {
  let dhl = DHL::new("YOUR_API_KEY");

  let tracking = dhl.tracking.get_tracking_sync("YOUR_TRACKING_NUMBER");

  match tracking {
    Ok(tracking) => println!("{:#?}", tracking),
    Err(err) => println!("{:#?}", err),
  }
}

Using Async I/O

use logistics_api::DHL;

#[tokio::main]
async fn main() {
  let dhl = DHL::new("YOUR_API_KEY");

  let tracking = dhl.tracking.get_tracking("YOUR_TRACKING_NUMBER").await;

  match tracking {
    Ok(tracking) => println!("{:#?}", tracking),
    Err(err) => println!("{:#?}", err),
  }
}

About

Track your packages from all over the world. Supports logicsitcs from DHL, UPS, FedEx, USPS, and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages