HueHttpClient

interface HueHttpClient

Internal client used for making authenticated requests to the Hue bridge.

Functions

Link copied to clipboard
abstract suspend fun <REQUEST, RESPONSE> sendRequest(method: String, pathSegments: Array<out String>, responseSerializer: KSerializer<HueResponse<RESPONSE>>, body: REQUEST? = null, requestSerializer: KSerializer<REQUEST>? = null): RESPONSE

Make a request to the hue bridge

Link copied to clipboard
abstract suspend fun <REQUEST, RESPONSE> sendV1Request(method: String, pathSegments: Array<out String>, responseSerializer: KSerializer<List<V1HueResponse<RESPONSE>>>, body: REQUEST? = null, requestSerializer: KSerializer<REQUEST>? = null): RESPONSE

Make a request to the hue bridge as a V1 endpoint.

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
inline suspend fun <T> HueHttpClient.deleteData(vararg pathSegments: String): T

Make a DELETE request to the hue bridge.@author

Link copied to clipboard
inline suspend fun <T> HueHttpClient.getData(vararg pathSegments: String): T

Make a GET request to the hue bridge.

Link copied to clipboard
inline suspend fun <REQUEST, RESPONSE> HueHttpClient.postData(body: REQUEST, vararg pathSegments: String): RESPONSE

Make a POST request to the hue bridge.

Link copied to clipboard
inline suspend fun <REQUEST, RESPONSE> HueHttpClient.putData(body: REQUEST, vararg pathSegments: String): RESPONSE

Make a PUT request to the hue bridge.