Go 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 Go SDK for the Laddro Career API.
Installation
Package not yet published. Check back soon.
Quick Start
package main
import (
"fmt"
"os"
laddro "github.com/laddro-app/laddro-career-sdk-go"
)
func main() {
client := laddro.NewClient(os.Getenv("LADDRO_API_KEY"))
// List templates
templates, err := client.Templates.List(ctx)
// Parse a resume
file, _ := os.Open("resume.pdf")
resume, err := client.Resumes.Parse(ctx, file)
// Tailor for a job
result, err := client.Tailor(ctx, &laddro.TailorParams{
ResumeID: resume.ID,
JobDescription: "Senior Backend Engineer at...",
})
fmt.Println(result.Suggestions)
}Configuration
client := laddro.NewClient(
apiKey,
laddro.WithBaseURL("https://api.laddro.com"),
laddro.WithTimeout(30 * time.Second),
)Streaming
stream, err := client.Tailor(ctx, &laddro.TailorParams{
ResumeID: "res_abc123",
JobDescription: "...",
}, laddro.WithStream())
for stream.Next() {
event := stream.Event()
fmt.Println(event.Section, event.Content)
}
if err := stream.Err(); err != nil {
log.Fatal(err)
}Error Handling
resume, err := client.Resumes.Get(ctx, "nonexistent")
if err != nil {
var apiErr *laddro.Error
if errors.As(err, &apiErr) {
fmt.Println(apiErr.Status) // 404
fmt.Println(apiErr.Message) // "Resume not found"
}
}Source
Last updated on