Git Product home page Git Product logo

mvscanner's Introduction

MVCF Scanning system API design

Data/Tables


Resident:


  • rfid: == String (17 digit num)
  • name: == String (Last, First)
  • doc: == String (982392)
  • room: == String (e.g 10b) 1 number && 'b' | t'' unit: == int

/api/residents

GET: Index /api/residents

GET: SHOW /api/residents/{rfid}

POST: Create /api/residents body=full payload

PATCH: Update /api/residents/{rfid} body={any_updated_fields}

DELETE: Delete /api/residents/{id}

GET: Index /api/residents/{id}/timestamps Get all timestamps for X resident DEFAULT= TODAY

GET: Show /api/residents/{id}/timestamps/{start_date}/{end_date}

========================================================

Locations:

/api/locations

  • id: int e.g. (6)
  • name: string e.g. (DeltaPod)

GET: Index (all locations)

GET: Show /api/locations{id} Get the name of location X

POST: Create /api/locations{body=full_payload} Add a new location to sign out to

/api/locations/{id}/timestamps

GET: Show Get all timestamps for X location DEFAULT= TODAY

/api/locations/{id}/timestamps/{start_date}/{end_date}

GET: Show Get all timestamps for X location within date range

Timestamps

/api/timestamps

  • rfid: string
  • dest: string

GET: Index /api/timestamps Get timestamps for that day (default)

GET: Show /api/timestamps

POST: Create /api/timestamps/{body=timestamp}

TIMESTAMP (Sent by front-end)

  [ 
    {
      "rfid": "12345678901234567",
      "location": 8
    }
  ]

RETURNS: (from back-end)

  {
    "rfid": "12345678901234567",
    "location": 0,
    "timestamp": "2019-10-10 10:10:10"
  }

IF two timestamps are received at the same location, the location returned will be 0: "AWAY" and that can be checked for on the front-end, and you can send another timestamp after prompting the user

GET Show /api/timestamps/{start_date}/{end_date}

mvscanner's People

Contributors

kmastroluca avatar pthorpe92 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.