Rails back end for Qualendar to provide basic persistence of calendar events.
- Install the dependencies:
bundle install
-
Edit
/config/database.ymlto match your preferred database configuration. By default, it is configured to connect via TCP to a Postgresql instance running on localhost:5432 -
Provision the database:
rake db:create db:migrate db:seed
- Test your configuration
rake test
- Run the development server (http://localhost:3000)
rails server
An event has the following JSON shape:
{
"id": 101,
"title": "Lunch with Bob",
"location": "La Esquina",
"duration": 60.0,
"isAllDay": false,
"startsAt": 1521676800000
}
Note:
startsAtis in milliseconds since Unix epochdurationis in minutes, unlessisAllDayis true, in which case it is in days
Verbs: GET
Gets all events that start within a specified year and month.
Example: get all events that start in Feb 2018
GET /events/2018/2
Verbs: POST, PUT, DELETE
Standard RESTful endpoints for manipulating Events. See events_controller_test.rb for examples.