eve-esi-api 0.0.4

This library provides an authentication to Eve-esi API and some endpoints to call.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}