Can you build a small project that allows the current user to create/update/delete a number
of Guides
? Each Guide
can contain a single Schedule
object and schedules
can have multiple
Events
.
Implement view layer logic that accepts inputs from the DOM, fetches data from the API and updates
the ul#guide-list
unordered list.
For this project, assume you have a DOM like so:
<input type="text" id="guide-name" placeholder="Create New Guide" />
<input type="button" id="submit-btn" value="Save Changes" />
<ul id="guide-list"></ul>
List Endpoint: /api/guide/
- GET returns a list of guides for the current user
- POST w/ valid data returns a new Guide object
Detail Endpoint: /api/guide/<id>/
- GET returns the details for a specific guide
- PUT w/ valid data updates an existing Guide object
List Endpoint: /api/schedule/
- GET requires
guide
querystring param; returns a list of schedules for the specified guide - POST w/ valid data returns a new Schedule object
Detail Endpoint: /api/schedule/<id>/
- GET requires
guide
querystring param; returns the details for a specific schedule - PUT w/ valid data updates an existing Schedule object
List Endpoint: /api/event/
- GET requires
schedule
querystring param; returns a list of events for the specified schedule - POST w/ valid data returns a new Event object
Detail Endpoint: /api/schedule/<id>/
- GET requires
guide
querystring param; returns the details for a specific schedule - PUT w/ valid data updates an existing Schedule object