#wraps #api #println #office #someone #fsr #ifsr

buerostatus

A Rust crate that wraps the buerostatus API from https://github.com/fsr

2 releases

Uses old Rust 2015

0.1.1 Jan 24, 2017
0.1.0 May 26, 2016

#4 in #someone

23 downloads per month

MIT license

4KB

buerostatus-rs

A small Rust crate that wraps the API of fsr/buerostatus and tells wou whether someone is in the office.

Build Status Crates.io

Example

if let Ok(is_open) = get_buerostatus() {
    if is_open { println!("Someone's inside!"); }
    else { println!("No one is there..."); }
}
else {
    println!("An error occured!");
}

Usage & Documentation

Please check the documentation for details on certain functions and errors.

Roadmap

  • Write some examples
  • Add travis
  • Documentation
  • Maybe add function to get exact light value

License

This work is licensed under the MIT License. For more information, head over to the LICENSE file.


lib.rs:

This crate is a small wrapper around the buerostatus API of the @fsr that tells you whether someone is in our office or not.

Example

if let Ok(is_open) = get_buerostatus() {
    if is_open { println!("Someone's inside!"); }
    else { println!("No one is there..."); }
}
else {
    println!("An error occured!");
}

The function get_buerostatus() offers a precise error message in case of an error. See the enum ApiError for more information.

Dependencies

~6–15MB
~214K SLoC