1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! # EVE ESI Request Methods
//!
//! Provides utility methods for making requests to EVE Online's ESI. These
//! methods are used internally by the [`crate::endpoints`] module to make requests.
//!
//! Despite the use case intended primarily to be internal, these functions are exported publicly
//! to allow for using the ESI client to make requests to custom ESI routes. This is useful
//! for when this crate hasn't implemented an ESI route yet but you still wish to use the client
//! to make requests to the route.
//!
//! For usage regarding making ESI requests with the eve_esi crate, see the
//! [endpoints module documentation](crate::endpoints)
//!
//! ## Modules
//! - [`public`]: Methods for making public requests to ESI endpoints
//! - [`authenticated`]: Methods for making authenticated requests to ESI endpoints using an access token
//!
//! ## Usage
//!
//! ```no_run
//! use serde::{Serialize, Deserialize};
//!
//! #[tokio::main]
//! async fn main() {
//! // Setup a basic Client with a user agent to identify requests
//! let user_agent = "MyApp/1.0 (contact@example.com; +https://github.com/your/repository)";
//! let esi_client = eve_esi::Client::new(user_agent).expect("Failed to build ESI Client");
//!
//! // Define the struct to deserialize the ESI response to
//! #[derive(Serialize, Deserialize)]
//! pub struct CharacterAffiliations {
//! pub alliance_id: Option<i64>,
//! pub character_id: i64,
//! pub corporation_id: i64,
//! pub faction_id: Option<i64>,
//! };
//!
//! // Define the URL to make the request to
//! let esi_endpoint_url = "https://esi.evetech.net/characters/affiliation/";
//!
//! // Make the request with the earlier defined struct
//! // - The first type, `<Vec<CharacterAffiliations>`, represents the response body to deserialize
//! // - The second type, `Vec<i64>`, represents the request body to serialize (not applicable to GET requests)
//! let character_ids = vec![2114794365];
//!
//! let character_affiliations = esi_client
//! .esi()
//! .post_to_public_esi::<Vec<CharacterAffiliations>, Vec<i64>>(&esi_endpoint_url, &character_ids)
//! .await;
//! }
//! ```
use crateClient;
/// Provides utility methods for making requests EVE Online's ESI endpoints
///
/// See the [module-level documentation](super) for an overview, methods, & usage example.