Blinkenlights API Protocol v0.0.2

Eventually there will be a vast directory of Blinkenlights to choose from in the app, but until then each Blinkenlight is custom made by implementing a URL endpoint which returns data that conforms to the Blinkenlights JSON protocol.

For now when you add a Blinkenlight in the app, you will specify a URL which it represents.


Objects:

Blinkenlight

A single Blinkenlight object

Create an endpoint which returns a JSON dictionary with the following keys:

Required Keys:

Example:
{
  "title":"Slushie of the Day",
  "description":"Today's flavor is Blue Raspberry!",
  "ledColor":"#38B1FF",
}
Optional Keys: Example:
{
  "title":"Slushie of the Day",
  "description":"Today's flavor is Blue Raspberry!",
  "ledColor":"#38B1FF",
  "ledLabel":"SLUSHIE",
  "ledLabelColor":"#00ff00",
  "ledBlinkRate":4
  "isError":true,
  "errorText":"We are all out of slushies!"
}

Blinkenlight Group

A 'group' object which represents multiple Blinkenlights Required Keys: Optional Keys: Example:
{
    "type": "group",
    "groupTitle": "All the Slushies",
    "groupLabel": "SLUSHIES",
    "groupLabelColor": "#ffff00",
    "blinkenlights": [{
            "title": "Slushie of the Day",
            "description": "Today's flavor is Lemon!",
            "ledColor": "#FFFF00",
            "ledBlinkRate": 1,
            "ledLabel": "SLUSHIE",
        }, {
            "title": "Slushie of the Day",
            "description": "B Today's flavor is Blue Raspberry!",
            "ledColor": "#38B1FF",
            "ledBlinkRate": 2,
            "ledLabel": "SLUSHIE",
        }
    ]
}

Registry

A Registry describes a list of Blinkenlight objects or Groups that users can add to their dashboard.

A JSON dictionary with the following keys:

Required Keys:

Example:

{
    "title":"Main Registry",
    "registry": [
        {
            "title":"Test 1",
            "description":"A single blinkenlight",
            "type":"blinkenlight",
            "url":"http://blinkenlights-api.jazzychad.net/blinkenlights/bl_test.json"
        },
        {
            "title":"Test 2",
            "description":"A group of blinkenlights",
            "type":"group",
            "url":"http://blinkenlights-api.jazzychad.net/blinkenlights/bl_group.json"
        }
    ]

}

Registry Item

An item describing a Blinkenlight Object or Group that is shown as part of a Registry list

A JSON dictionary with the following keys:

Required Keys:

Example:
{
    "title":"Test 1",
    "description":"A single blinkenlight",
    "type":"blinkenlight",
    "url":"http://blinkenlights-api.jazzychad.net/blinkenlights/bl_test.json"
}

Your endpoints could dynamically return Blinkenlight dictionaries about server status, stock info, weather info, inventory levels, etc... It's up to you!

What is this all about? Start here - at this tweet - and follow the chain up to the root.