rule_helpers: Rule Helpers

Description Usage Arguments Value

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

1
2
3
condition(address, operator, value = NULL)

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().


fascinatingfingers/PhilipsHue documentation built on Nov. 25, 2019, 2:22 a.m.