Created
June 25, 2016 23:00
-
-
Save qerub/e2cdbe50884056d3afbc4f74bd560b0b to your computer and use it in GitHub Desktop.
First stab at a Swagger/OpenAPI specification for the LIFX API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
title: LIFX HTTP Remote Control API | |
version: v1 | |
description: https://api.developer.lifx.com/ | |
host: api.lifx.com | |
basePath: /v1 | |
schemes: | |
- https | |
produces: | |
- application/json | |
securityDefinitions: | |
authorization: | |
name: Authorization | |
type: apiKey | |
in: header | |
paths: | |
/lights/{selector}: | |
get: | |
operationId: getLights | |
parameters: | |
- name: selector | |
in: path | |
required: true | |
type: string | |
responses: | |
200: | |
description: "" | |
schema: | |
type: array | |
items: | |
$ref: "#/definitions/Light" | |
security: | |
- authorization: [] | |
# TODO: Add more paths | |
definitions: | |
Light: | |
type: object | |
properties: | |
id: | |
type: string | |
label: | |
type: string | |
connected: | |
type: boolean | |
# TODO: Add more properties |
A more complete specification can now be found here: https://github.com/qerub/lifx-swagger-specification
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Play with it in the Swagger Editor: http://editor.swagger.io/?url=https://gist.githubusercontent.com/qerub/e2cdbe50884056d3afbc4f74bd560b0b/raw/3467d665b590101bf0b3da4f2bc1cd13ce731804/lifx.yaml