This is a simple JSON api that receives commands and sends messages regarding individual courses and the assignments associated with a given course.
To set this api up on your local environment requires the following steps:
-
download source code to your local machine
-
update your /etc/hosts file to include the line ‘127.0.0.1 localhost api.coursework-tracker.com`
-
navigate to the root folder of the api project
-
start up a server for the api with ‘rails s`
Issuing requests to the hosting server can be done like so:
-
curl api.coursework-tracker.com/courses => Returns a list of courses
-
curl -iX POST -d ‘course=Biology+101&course=4.0’ api.coursework-tracker.com/courses => creates a course record
-
curl -iX PATCH -d ‘assignment=100+word+essay’ api.coursework-tracker.com/courses/:id/assignments/:id => updates an existing assignment record
There are courses and assignments. Courses have the following required fields when being created:
-
name:String
-
credit_hours:Float
Assignment required fields are:
-
name:String
-
points_possible:Integer
-
points_received:Integer
-
complete:Boolean