| Crates.io | hermes-sdk |
| lib.rs | hermes-sdk |
| version | 0.1.0 |
| created_at | 2025-08-04 21:59:56.6517+00 |
| updated_at | 2025-08-26 23:29:53.51309+00 |
| description | The most comprehensive Rust SDK for eBay marketplace APIs - 17 specialized clients with 86+ methods |
| homepage | https://github.com/rossjameslee/hermes-sdk |
| repository | https://github.com/rossjameslee/hermes-sdk |
| max_upload_size | |
| id | 1781261 |
| size | 318,766 |
The most comprehensive Rust SDK for eBay marketplace APIs - 17 specialized clients with 86+ methods for complete e-commerce automation.
Add to your Cargo.toml:
[dependencies]
hermes-sdk = "0.1"
tokio = { version = "1.0", features = ["full"] }
use hermes_sdk::{EbayClient, EbayConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Configure eBay client
let config = EbayConfig::new()
.with_app_id("your-app-id")
.with_cert_id("your-cert-id")
.with_sandbox(true); // Use false for production
let mut client = EbayClient::new(config)?;
// Search for items
let results = client.search_items("gaming laptop", Some(10)).await?;
println!("Found {} items", results.total);
// Get item details
let item = client.get_item("item-id").await?;
println!("Item: {}", item.title);
// Access specialized clients
let analytics = client.analytics()?;
let inventory = client.inventory()?;
let compliance = client.compliance()?;
Ok(())
}
Create a .env file:
EBAY_APP_ID_SANDBOX=your-sandbox-app-id
EBAY_CERT_ID_SANDBOX=your-sandbox-cert-id
EBAY_DEV_ID_SANDBOX=your-sandbox-dev-id
EBAY_APP_ID_PRODUCTION=your-production-app-id
EBAY_CERT_ID_PRODUCTION=your-production-cert-id
EBAY_DEV_ID_PRODUCTION=your-production-dev-id
EBAY_SANDBOX=true
Then load in your code:
use hermes_sdk::{EbayClient, EbayConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Load environment variables
dotenvy::dotenv().ok();
let sandbox = std::env::var("EBAY_SANDBOX")
.unwrap_or_else(|_| "true".to_string())
.parse::<bool>()
.unwrap_or(true);
let (app_id, cert_id) = if sandbox {
(
std::env::var("EBAY_APP_ID_SANDBOX")?,
std::env::var("EBAY_CERT_ID_SANDBOX")?,
)
} else {
(
std::env::var("EBAY_APP_ID_PRODUCTION")?,
std::env::var("EBAY_CERT_ID_PRODUCTION")?,
)
};
let config = EbayConfig::new()
.with_app_id(&app_id)
.with_cert_id(&cert_id)
.with_sandbox(sandbox);
let mut client = EbayClient::new(config)?;
// Your code here...
Ok(())
}
let analytics = client.analytics()?;
let reports = analytics.get_traffic_reports("EBAY_US", Some("2024-01-01"), Some("2024-01-31")).await?;
let inventory = client.inventory()?;
let offers = inventory.get_offers(Some("PUBLISHED"), Some(50), Some(0)).await?;
let compliance = client.compliance()?;
let violations = compliance.get_listing_violations("EBAY_US", "PRODUCT_ADOPTION").await?;
The SDK uses a unified client architecture with lazy loading:
See the examples/ directory for comprehensive usage examples:
cargo run --example basic_usage
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for the Rust and e-commerce community