pub fn status() -> Result<bool>Expand description
If all is good with no errors; returns true if live, returns false if
down.
ยงErrors
if reqwest cannot send the request to The Senpy API
Examples found in repository?
examples/status.rs (line 21)
19fn main() {
20 print!("api.senpy.live is ");
21 match senpy::status() {
22 Ok(status) =>
23 if status {
24 println!("live!")
25 } else {
26 println!("down...")
27 },
28 Err(e) => println!("{}", e),
29 }
30}