Structures
The following structures are available globally.
-
Declaration
Swift
public struct AnimationData
extension AnimationData: Equatable
extension AnimationData: Codable
extension AnimationData: CustomStringConvertible
-
Declaration
Swift
public struct AnimationDataFrame
extension AnimationDataFrame: Equatable
extension AnimationDataFrame: CustomStringConvertible
-
Declaration
Swift
public struct Panel
extension Panel: Equatable
extension Panel: CustomStringConvertible
-
Declaration
Swift
public struct Effect
extension Effect: Codable
-
Declaration
Swift
public struct PaletteColor
extension PaletteColor: Codable
-
Declaration
Swift
public struct RangedValue<T> where T : Decodable, T : Encodable, T : Equatable
extension RangedValue: Codable
extension RangedValue: Equatable
-
Declaration
Swift
public struct APIError
extension APIError: LocalizedError
extension APIError: Codable
extension APIError: Equatable
-
Declaration
Swift
public struct Value<T> where T : Decodable, T : Encodable, T : Equatable
extension Value: Codable
extension Value: Equatable
-
Declaration
Swift
public struct ValueRange<T> where T : Decodable, T : Encodable
extension 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 moreRangedValue
is 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 moreRangedValue
is 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 moreRangedValue
is 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 moreRangedValue
is 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 moreDeviceAddressResolver
to resolve local a Nanoleaf devices address. Then use the resultingDeviceAddress
to build requests.Declaration