Skip to main content

LightService

A list of all methods in the LightService service. Click on the method name to view detailed information about that method.

MethodsDescription
GetLightsAsyncList all available lights.
GetLightAsyncGet details of a single light from its given {lightId}.
UpdateLightAsyncUpdate a single light from its given {lightId}.

GetLightsAsync

List all available lights.

  • HTTP Method: GET
  • Endpoint: /clip/v2/resource/light

Return Type

GetLightsOkResponse

Example Usage Code Snippet

using OpenHue;

var client = new OpenHueClient();

var response = await client.Light.GetLightsAsync();

Console.WriteLine(response);

GetLightAsync

Get details of a single light from its given {lightId}.

  • HTTP Method: GET
  • Endpoint: /clip/v2/resource/light/{lightId}

Parameters

NameTypeRequiredDescription
lightIdstringID of the light

Return Type

GetLightOkResponse

Example Usage Code Snippet

using OpenHue;

var client = new OpenHueClient();

var response = await client.Light.GetLightAsync("lightId");

Console.WriteLine(response);

UpdateLightAsync

Update a single light from its given {lightId}.

  • HTTP Method: PUT
  • Endpoint: /clip/v2/resource/light/{lightId}

Parameters

NameTypeRequiredDescription
inputLightPutThe request body.
lightIdstringID of the light

Return Type

UpdateLightOkResponse

Example Usage Code Snippet

using OpenHue;
using OpenHue.Models;

var client = new OpenHueClient();

var input = new LightPut();

var response = await client.Light.UpdateLightAsync(input, "lightId");

Console.WriteLine(response);

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →