Skip to content

Controller App API Spec

piuggi edited this page Feb 26, 2014 · 7 revisions

Base API Call

Request:

GET http://localhost:3000/api

Response:

 {
   "sales": {

   "play_all": "/api/play/sales",
   "play_single": [
        {
          "Restaurants": "/api/play/restaurants"
        },
        {
          "Parks and Such": "/api/play/parks-and-such"
        }
        ]
  },
 
 "ambient": {

   "play_all": "/api/play/ambient",
   "play_single": [
        {
          "Ambient Content": "/api/play/ambient-content"
        }
        ]
 },

 "commands": {

   "pause": "/api/control/pause",
   "resume": "/api/control/resume",
   "end": "/api/control/end"
  }
 }

Play All Content Type API Call

Request:

GET http://localhost:3000/api/play/sales

—or—

GET http://localhost:3000/api/play/ambient

Response:

{ “success”: “Sent (Ambient or Sales) Event” }

—or—

{ “error”: “PlayerApp Not Connected” }

###Play All Content Type API Call

Request:

GET http://localhost:3000/api/play/{:slug}

Example: GET http://localhost:3000/api/play/restaurants (options provided by Base API Call)

Response:

{ “success”: “Sent (Ambient or Sales) Event (title)” }

—or—

{ “error”: “PlayerApp Not Connected” }

##Control API Call

**Request: ** GET http://localhost:3000/api/control/:ctrl

Example: GET http://localhost:3000/api/control/pause (options provided by Base API Call)

Response:

{ “success”: “Sent Command (ctrl)” }

—or—

{ “error”: “Command Not Recognized (ctrl)” }

—or—

{ “error”: “PlayerApp Not Connected” }

Clone this wiki locally