With this API, users have the ability to pull information regarding users, beacons, and visits. Users contain a first and last name, status, presence, and email. Beacons contain a name and an identification number. Users and Beacons are joined by Visits which contain a User ID, Beacon ID, enter and exit time, and day. The site is hosted live at https://byteshift-api-sg.herokuapp.com/ and you can use any of the endpoints listed below.
- Endpoints for GET (all and by id), POST, PUT and DELETE.
- A RANDOM endpoint that randomly returns a present preferred user.
- A SEARCH endpoint that accepts email, status, and presence as search queries
- A CHECK endpoint that accepts email and password as parameters, returning data only if email and password match user in database
- Endpoints for GET (all and by id), POST, PUT and DELETE.
- A SEARCH endpoint that accepts name and identification number as search queries
- Endpoints for GET (all and by id), POST, PUT and DELETE.
- A SEARCH endpoint that accepts day as search query
As of writing this README, these instructions work on MacOS.
- Run
$ git clone <this-repository-url>
- Then
$ cd Byteshift-Database
- Once in the Byteshift-Database folder, run
bundle install
to install gems,$ rails db:setup
to setup the database, and$ rails s
to run the server. Then visit http://localhost:3000 to view the app.
Returns all users.
Returns the user matching the id.
Creates a new user.
Updates specified user.
Deletes specified user.
Returns a random user.
Returns all users with the given query.
Returns user with the given email and password.
Returns all beacons.
Returns the beacon matching the id.
Creates a new beacon.
Updates specified beacon.
Deletes specified beacon.
Returns all beacons with the given query.
Returns all visits.
Returns the visit matching the id.
Creates a new visit.
Updates specified visit.
Deletes specified visit.
Returns all visits with the given query.
- Ruby ~> 2.4.1
- Rails ~> 5.1
- ActiveRecord
- Postgres
- Bundler
- HTML
- Faker Gem
Ken Rutan & Steven Galvin
MIT License
Copyright (c) 2017
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.