1#[derive(Debug, Clone)]
2pub struct Config {
3 pub user_agent: String,
4 pub client_id: String,
5 pub client_secret: String,
6 pub username: Option<String>,
7 pub password: Option<String>,
8 pub access_token: Option<String>,
9}
10
11impl Config {
12 pub fn new(user_agent: &str, client_id: &str, client_secret: &str) -> Config {
13 Config {
14 user_agent: user_agent.to_owned(),
15 client_id: client_id.to_owned(),
16 client_secret: client_secret.to_owned(),
17 username: None,
18 password: None,
19 access_token: None,
20 }
21 }
22}