RachioObject module

RachioObject module containing a helper class for all API calls.

class rachiopy.rachioobject.RachioObject(authtoken: str, http_session=None, timeout=25)

The Rachio base object.

delete_request(path: str, body=None)

Make a DELETE request to the API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple

get_request(path: str, body=None)

Make a GET request to the API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple

post_request(path: str, body=None)

Make a POST request to the API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple

put_request(path: str, body=None)

Make a PUT request to the API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple

valve_delete_request(path: str, body=None)

Make a DELETE request to the valve API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple

valve_get_request(path: str, body=None)

Make a GET request to the valve API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple

valve_post_request(path: str, body=None)

Make a POST request to the valve API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple

valve_put_request(path: str, body=None)

Make a PUT request to the valve API.

Returns:

The return value is a tuple of (response, content), the first being and instance of the httplib2.Response class, the second being a string that contains the response entity body (Python object if it contains JSON).

Return type:

tuple