Structures
The following structures are available globally.
-
Declaration
Swift
public struct AnimationDataextension AnimationData: Equatableextension AnimationData: Codableextension AnimationData: CustomStringConvertible -
Declaration
Swift
public struct AnimationDataFrameextension AnimationDataFrame: Equatableextension AnimationDataFrame: CustomStringConvertible -
Declaration
Swift
public struct Panelextension Panel: Equatableextension Panel: CustomStringConvertible -
Declaration
Swift
public struct Effectextension Effect: Codable -
Declaration
Swift
public struct PaletteColorextension PaletteColor: Codable -
Declaration
Swift
public struct RangedValue<T> where T : Decodable, T : Encodable, T : Equatableextension RangedValue: Codableextension RangedValue: Equatable -
Declaration
Swift
public struct APIErrorextension APIError: LocalizedErrorextension APIError: Codableextension APIError: Equatable -
Declaration
Swift
public struct Value<T> where T : Decodable, T : Encodable, T : Equatableextension Value: Codableextension Value: Equatable -
Declaration
Swift
public struct ValueRange<T> where T : Decodable, T : Encodableextension ValueRange: Codable -
Authenticate the user with a Nanoleaf device.
A user is authorized if they can demonstrate physical access to the device. This is achieved by holding the power button down for 5-7 seconds until the LED starts flashing in a pattern.
Once the LED starts flashing, execute this request within 30 seconds.
See moreDeclaration
Swift
public struct AuthenticateRequest : HTTPRequest
-
Declaration
Swift
public struct Empty : Codable -
Execute an effect command.
Use this request to:
- Add and update animations.
- Fetch an effect.
- Fetch all effects.
- Delete an effect.
- Display a preview of an effect.
- Rename an effect.
- Temporarily display an effect.
- Fetch plugins.
Declaration
Swift
public struct ExecuteCommandRequest<T> : HTTPRequest where T : Decodable -
Fetch a list of effects.
See moreDeclaration
Swift
public struct FetchEffectsRequest : HTTPRequest -
Fetch the currently selected effect.
See moreDeclaration
Swift
public struct FetchSelectedEffectRequest : HTTPRequest -
Declaration
Swift
public struct UpdateSelectedEffectRequest : HTTPRequest -
Fetch all information about a Nanoleaf device.
See moreDeclaration
Swift
public struct FetchDeviceRequest : HTTPRequest -
Causes the panels to flash in unison. This is typically used to help users differentiate between multiple panels.
See moreDeclaration
Swift
public struct IdentifyPanelsRequest : HTTPRequest -
Fetch a device’s global orientation.
The global orientation can be a value between 0 and 360.
See moreDeclaration
Swift
public struct FetchGlobalOrientationRequest : HTTPRequest -
Fetch a device’s panel layout.
See moreDeclaration
Swift
public struct FetchPanelLayoutRequest : HTTPRequest -
Update a device’s panel layout.
See moreDeclaration
Swift
public struct UpdatePanelLayoutRequest : HTTPRequest -
Fetch a device’s brightness level.
A
See moreRangedValueis returned which will describe the current value and the maximum and minimum the value can be.Declaration
Swift
public struct FetchBrightnessRequest : HTTPRequest -
Declaration
Swift
public struct FetchColorModeRequest : HTTPRequest -
Fetch a device’s colour temperature.
A
See moreRangedValueis returned which will describe the current value and the maximum and minimum the value can be.Declaration
Swift
public struct FetchColorTemperatureRequest : HTTPRequest -
Fetch a device’s hue.
A
See moreRangedValueis returned which will describe the current value and the maximum and minimum the value can be.Declaration
Swift
public struct FetchHueRequest : HTTPRequest -
Declaration
Swift
public struct FetchOnOffStateRequest : HTTPRequest -
Fetch a device’s saturation.
A
See moreRangedValueis returned which will describe the current value and the maximum and minimum the value can be.Declaration
Swift
public struct FetchSaturationRequest : HTTPRequest -
Update a device’s state.
This request can be used to update the device’s:
- On/off status.
- Brightness.
- Hue.
- Saturation.
- Color temperature.
Declaration
Swift
public struct UpdateStateRequest : HTTPRequest
-
Value mutation.
This struct provides an abstrated way of building mutations for a device’s state.
See moreDeclaration
Swift
public struct ValueMutation : Codable -
A device’s address.
Use
See moreDeviceAddressResolverto resolve local a Nanoleaf devices address. Then use the resultingDeviceAddressto build requests.Declaration
Structures Reference