Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.

acntech-archive/ads-api

Repository files navigation

Accenture Digital Signage Backend

Prerequisites

Getting started

git clone https://github.com/acntech/ads-api.git
cd ads-api
npm install
start mongoDB in another terminal or background (MacOSX: mongod, Windows: ?)
Start API node server by: node server.js

You should be able to test REST API for the ADS API Open a web browser and go to http://localhost:5000/api/player

API

Tip: use Chrome Rest Console to test the REST API.

HTTP Action Route Description
GET /api/player Read all MPs
GET /api/player/:id Read Media Player by ID
PUT /api/player/:id Update existing Media Player by ID
POST /api/player Create new Media Player
DELETE /api/player/:id Delete existing Media Player by ID

Information Model

Media Player

    name: {
    type: String,
    trim: true
    },
    ip: String,
    location: {
       floor: {
           type: Number,
           min: 2,
           max: 4
       },
       zone: {
           type: String,
           default: 'external'
       }
    },
    isActive: {
       type: Boolean,
       default: false
    },
    created: {
       type: Date,
       default: Date.now
    },
    updated: {
       type: Date,
       default: Date.now
    }
          

Example

[
      {
       "name": "Ruby",
       "ip": "127.0.0.100",
       "_id": "5240cef5b17cf20200000001",
       "__v": 0,
       "updated": "2013-09-23T23:29:57.541Z",
       "created": "2013-09-23T23:29:57.540Z",
       "isActive": true,
       "location": {
           "floor": 2,
           "zone": "external"
       }
      },
      {
       "name": "Scala",
       "ip": "127.0.0.101",
       "_id": "5240cef5b17cf20200000002",
       "__v": 0,
       "updated": "2013-09-23T23:29:57.546Z",
       "created": "2013-09-23T23:29:57.546Z",
       "isActive": true,
       "location": {
           "floor": 2,
           "zone": "external"
       }
      }
]

About

Accenture Digital Signage - backend repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5