tba_openapi_rust/apis/
configuration.rs

1/*
2 * The Blue Alliance API v3
3 *
4 * # Overview    Information and statistics about FIRST Robotics Competition teams and events.   # Authentication   All endpoints require an Auth Key to be passed in the header `X-TBA-Auth-Key`. If you do not have an auth key yet, you can obtain one from your [Account Page](/account).
5 *
6 * The version of the OpenAPI document: 3.8.2
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13
14
15#[derive(Debug, Clone)]
16pub struct Configuration {
17    pub base_path: String,
18    pub user_agent: Option<String>,
19    pub client: reqwest::Client,
20    pub basic_auth: Option<BasicAuth>,
21    pub oauth_access_token: Option<String>,
22    pub bearer_access_token: Option<String>,
23    pub api_key: Option<ApiKey>,
24    // TODO: take an oauth2 token source, similar to the go one
25}
26
27pub type BasicAuth = (String, Option<String>);
28
29#[derive(Debug, Clone)]
30pub struct ApiKey {
31    pub prefix: Option<String>,
32    pub key: String,
33}
34
35
36impl Configuration {
37    pub fn new() -> Configuration {
38        Configuration::default()
39    }
40}
41
42impl Default for Configuration {
43    fn default() -> Self {
44        Configuration {
45            base_path: "https://www.thebluealliance.com/api/v3".to_owned(),
46            user_agent: Some("OpenAPI-Generator/3.8.2/rust".to_owned()),
47            client: reqwest::Client::new(),
48            basic_auth: None,
49            oauth_access_token: None,
50            bearer_access_token: None,
51            api_key: None,
52
53        }
54    }
55}