NanoleafClient

public final class NanoleafClient

An API client that sends requests to Nanoleaf devices.

Initialization

Request

  • execute(request:) Asynchronous

    Execute a request.

    Throws

    An error of type APIError.

    Declaration

    Swift

    public func execute<T>(request: T) async throws -> T.ResponseObject where T : HTTPRequest

    Return Value

    The HTTPRequest’s response object.

Helpers

  • Declaration

    Swift

    public static func main(
        session: HTTPSession = URLSession(configuration: .default)
    ) -> Self