https://github.com/shahen94/logistics-api
Track your packages from all over the world. Supports logicsitcs from DHL, UPS, FedEx, USPS, and more.
https://github.com/shahen94/logistics-api
async dhl dhl-api fedex fedex-api logistics rust ups ups-api
Last synced: 4 days ago
JSON representation
Track your packages from all over the world. Supports logicsitcs from DHL, UPS, FedEx, USPS, and more.
- Host: GitHub
- URL: https://github.com/shahen94/logistics-api
- Owner: shahen94
- Created: 2023-03-16T10:57:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T16:44:20.000Z (about 3 years ago)
- Last Synced: 2025-02-03T11:41:40.410Z (over 1 year ago)
- Topics: async, dhl, dhl-api, fedex, fedex-api, logistics, rust, ups, ups-api
- Language: Rust
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logistics API
## Supported APIs
* DHL (✅)
* UPS (🕒)
* Fedex (🕒)
### Usage
**With Blocking I/O**
```rust
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**
```rust
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),
}
}
```