melcloud_api/api/types/
config.rs1use std::env;
2
3#[derive(Debug)]
8pub struct Config {
9 pub api_url: String,
10 pub api_password: String,
11 pub api_username: String
12}
13
14impl Config {
15 pub fn new_with_creds(username: String, password: String) -> Config {
16 Config {
17 api_url: String::from("https://app.melcloud.com/Mitsubishi.Wifi.Client"),
18 api_username: username,
19 api_password: password
20 }
21 }
22 pub fn new(url: &str, username: &str, password: &str) -> Config {
23 Config {
24 api_url: String::from(url),
25 api_username: String::from(username),
26 api_password: String::from(password)
27 }
28
29 }
30}