Learn R Programming

PhilipsHue (version 1.0.0)

rule_helpers: Rule Helpers

Description

Defining rules can become quite verbose, and it can be tricky to prepare the proper list structure for the POST or PUT request. These functions simplify things a bit and provide a leaner, more semantic interface.

Usage

condition(address, operator, value)

action(address, method, ...)

Arguments

address

path to attribute or resource

operator

one of: eq, gt, lt, dx, ddx, stable, not stable, in, not in

value

the value a condition will compare against

method

the HTTP method used to send the body to the given address

...

named parameters to include in action body

Value

Returns a list-like structure suitable for create_rule() or set_rule_attributes().