docs.rs failed to build huelib-0.6.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
huelib-0.13.2
huelib-rs
Rust bindings for the Philips Hue API.
About
This library sends HTTP requests to the bridge using the ureq crate. The responses/requests are deserialized/serialized using the serde, serde_json and serde_repr crates.
Examples
Modifies the state of a light on a specific bridge:
use ;
use Bridge;
use ;
// Create a bridge with IP address and username.
let bridge = new;
// Create a state modifier that increments the brightness by 40 and sets the saturation to 200.
let modifier = new
.brightness
.saturation;
// Set attributes of the light with index '1' from the modifier and print the responses.
match bridge.set_light_state ;
Creates a group and registers a user on a discovered bridge:
use ;
// Get the IP address of the bridge that was first discovered in the local network.
let ip_address = discover
.expect
.pop
.expect;
// Register a user on the discovered bridge.
let user = register_user
.expect;
// Create a bridge with IP address and username.
let bridge = new;
// Create a group creator that sets the name to 'group1', adds the lights with the index '1'
// and '2' to the group and sets the class to 'Office'.
let creator = new.class;
// Create the group and print the identifier of the new group.
match bridge.create_group ;