Skip to content

Latest commit

 

History

History
96 lines (58 loc) · 2.2 KB

File metadata and controls

96 lines (58 loc) · 2.2 KB

LightService

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

Methods Description
GetLightsAsync List all available lights.
GetLightAsync Get details of a single light from its given {lightId}.
UpdateLightAsync Update 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

Name Type Required Description
lightId string ID 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

Name Type Required Description
input LightPut The request body.
lightId string ID 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);