Thanks to visit codestin.com
Credit goes to github.com

Skip to content

shackspace/shackles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shackles

With rfid wristbands, called shackles

API

All REST-urls are within /api/

User

###JSON Datastructure { _id: String - username rfids: [String] - array of rfids as md5 hash status: String - current status, either 'logged in' or 'logged out' activity: [{ - array of activities date: Date - date of activity action: String - action, either 'login' or 'logout' }] }

List All Users

GET /api/user

returns:

200 - all users as full objects as json.

Get One User By Id/Username

GET /api/user/:id

returns:

200 - user as json
404 null - no matching username

Get One User By RFID

GET /api/id/:id

GET /api/rfid/:id

returns:

200 - user (with only last activity in activityarray) as json
404 null - if there is no matching RFID

Register User

POST /api/user

POST json: {username, rfid}

returns:

200 - successful register

Login User with :id

GET /api/user/:id/login

returns:

200 - successful login

Logout User with :id

GET /api/user/:id/logout

returns:

200 - successful logout

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors