mick / billboard

Control content in a browser via a simple HTTP API. Great for office wall mounted displays
MIT License
12 stars 6 forks source link

Billboard

Got screens in your home or office? Wish you could magically zap stuff onto them? Here's an API for that.

Simply open a unique URL in a fullscreen web browser on as many or as few screens as you'd like, and issue calls to the Billboard API. Your content will appear on the screens you've specified, through the magic of node.js and Socket.io.

Setup

  1. Deploy a copy of Billboard to a location of your choice. (We like Heroku.)
  2. On a computer connected to a screen, open the following URL: http://{host_location}/screens/{screen_name_of_your_choice}. (We suggest using Google Chrome in fullscreen mode.)
  3. Repeat Step 2 for as many screens as you have.
  4. Issue calls to the API (see below) and your content appears.

API Usage

Display content on a screen

You can several types of content.

curl -X POST -d content="<Path to Image/Youtube/Iframe or Text>" http://{billboard_instance_url}/api/screens/home

You can force how to handle the content by adding the action param.

curl -X POST -d action=image -d content="<Path to Image" http://{billboard_instance_url}/api/screens/home

To make the content the default. It reverts to the default after showing other content. set default=true

curl -X POST -d defult=true -d content="<Path to Image" http://{billboard_instance_url}/api/screens/home

response:

{
  "status": "ok"
}

List Available Screens

List the names of screens that are currently available:

curl http://{billboard_instance_url}/api/screens

response:

    {   
      "screens": [
        "all", // all currently connected screens
        "right",
        "left"
        ]
    }

Reload a screen

Runs window.location.reload() to force get a screen to update:

curl http://{billboard_instance_url}/api/screens/:name:/reload

response:

{   
  "status": "ok"
}

Use the built in client to change the content.

billboard screenshot

If you browse to any screen http://{billboard_instance_url}/screens/{screen_name} you can edit the content directly from that screen. Simply click the gear to open the screen control. Then paste your image, youtube or other webpage link. Or just type some text to share with your coworkers.