33 lines
884 B
Rust
33 lines
884 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct Config {
|
|
pub api_key: String,
|
|
|
|
pub tags_url: String,
|
|
pub states_url: String,
|
|
pub locations_url: String,
|
|
|
|
pub timestamp_format: String,
|
|
pub between_format: String,
|
|
|
|
pub throttle: u32,
|
|
}
|
|
|
|
impl Default for Config {
|
|
fn default() -> Config {
|
|
Config {
|
|
api_key: "E3GrOiQAnY61BP623XXzt9Fo87A1IQrS1FFzD57P".to_owned(),
|
|
|
|
tags_url: "https://platform.yepzon.com/tags".to_owned(),
|
|
states_url: "https://platform.yepzon.com/tags/{tag}/states".to_owned(),
|
|
locations_url: "https://platform.yepzon.com/tags/{tag}/locations/{state}".to_owned(),
|
|
|
|
timestamp_format: "%Y-%m-%dT%H:%M:%S%.fZ".to_owned(),
|
|
between_format: "%d.%m.%Y %H:%M:%S".to_owned(),
|
|
|
|
throttle: 110,
|
|
}
|
|
}
|
|
}
|