You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
837 B
837 B
| title | status | type | created_at | updated_at | parent | blocked_by | ||
|---|---|---|---|---|---|---|---|---|
| Implement HTTP search function | todo | task | 2026-04-11T22:35:13Z | 2026-04-11T22:35:13Z | vibed-f05l |
|
Implement async fn search(query: &str) -> Result<SearchResponse, AppError> using reqwest.
Todo
- Define
AppError { Network(reqwest::Error), Parse(serde_json::Error) }with Display + From impls - Implement
search(): split query on whitespace for searchTerms, build full SearchRequest body - POST to
https://howlongtobeat.com/api/searchwith headers: User-Agent (Firefox), Referer, Content-Type - Use
.json(&body)for request and.json::<SearchResponse>()for response - Wire into
main: call search, match Ok/Err, print error to stderr and exit(1) on failure cargo checkpasses