use crate::domain::search::SearchResponse;
use crate::{ApiClient, Result};
use std::collections::HashMap;
pub async fn find_type(
client: &ApiClient,
char_id: usize,
search: String,
) -> Result<Option<SearchResponse>> {
let mut map = HashMap::new();
map.insert("search".to_string(), search.to_string());
map.insert("categories".to_string(), "inventory_type".to_string());
map.insert("strict".to_string(), "true".to_string());
client
.query_esi_with_params(format!("characters/{}/search/", char_id), map)
.await
}