Rust SDK
This SDK is currently in development and not yet published. The API surface described below is planned. Use the REST API directly in the meantime.
The official Rust SDK for the Laddro Career API.
Installation
Package not yet published. Check back soon.
Quick Start
use laddro_career::LaddroClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = LaddroClient::new("YOUR_API_KEY");
// List templates
let templates = client.templates().list().await?;
// Parse a resume
let file = tokio::fs::read("resume.pdf").await?;
let resume = client.resumes().parse(&file, "resume.pdf").await?;
// Tailor for a job
let result = client.tailor()
.resume_id(&resume.id)
.job_description("Senior Engineer at...")
.send()
.await?;
Ok(())
}Streaming
use futures::StreamExt;
let mut stream = client.tailor()
.resume_id("res_abc123")
.job_description("...")
.stream()
.await?;
while let Some(event) = stream.next().await {
let event = event?;
println!("{}: {}", event.section, event.content);
}Error Handling
use laddro_career::LaddroError;
match client.resumes().get("nonexistent").await {
Err(LaddroError::Api { status, message }) => {
eprintln!("{status}: {message}");
}
Err(e) => eprintln!("Network error: {e}"),
Ok(resume) => println!("{}", resume.title),
}Source
Last updated on