|
|
@ -1,6 +1,5 @@ |
|
|
|
use serde::Deserialize; |
|
|
|
use serde::Deserialize; |
|
|
|
use serde_json::Value; |
|
|
|
use serde_json::Value; |
|
|
|
use std::collections::HashMap; |
|
|
|
|
|
|
|
use std::env; |
|
|
|
use std::env; |
|
|
|
|
|
|
|
|
|
|
|
extern crate reqwest; |
|
|
|
extern crate reqwest; |
|
|
@ -17,12 +16,6 @@ struct Status { |
|
|
|
order: u8, |
|
|
|
order: u8, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#[derive(Deserialize, Debug)] |
|
|
|
|
|
|
|
struct Incidents { |
|
|
|
|
|
|
|
count: u16, |
|
|
|
|
|
|
|
days: Vec<HashMap<String, String>>, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn get_incidents() -> Result<(), reqwest::Error> { |
|
|
|
fn get_incidents() -> Result<(), reqwest::Error> { |
|
|
|
let res = reqwest::blocking::get(INCIDENTS_URL)?; |
|
|
|
let res = reqwest::blocking::get(INCIDENTS_URL)?; |
|
|
|
let data: Value = res.json()?; |
|
|
|
let data: Value = res.json()?; |
|
|
|