Name: Nahom Tesfatsion
Date: October 27, 2019
Project Topic: Professor Review
URL: https://professor-reviews.herokuapp.com/
Data point fields:
Field 1
: nameType: String
Field 2
: coursesType: [String]
Field 3
: departmentsType: [String]
Field 4
: overAllRatingType: Number
Field 5
: overAllGPAType: Number
Field 6
: overAllTagsType: {String}
Field 7
: reviewType: [{String, Number,Number,[String],String,Number]
Schema:
{
name : String,
courses : [String],
departments : [String],
overAllRating : Number,
overAllGPA : Number,
overAllTags : {String:Number}
reviews : [
{
course : String,
semester : Number,
rating : Number,
tags : [String],
comment : String,
timestamp : Number
}
],
}
HTML form route: /addReview
POST endpoint route: /api/addReview
Example Node.js POST request to endpoint:
var request = require("request");
var options = {
method: 'POST',
url: 'http://localhost:3000/api/...',
headers: {
'content-type': 'application/x-www-form-urlencoded'
},
form: {
name : "Nelson Padua-Perez"
course : "CMSC216",
department : "CMSC",
semester : 201908,
tags : ["HILARIOUS", "RESPECTED", "AMAZING LECTURES"]
comment : "He is a very engaging teacher and makes sure to get to know people as best as possible in a large class.",
rating : 5
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
GET endpoint route: /api/getReviews
Search Field: name
Navigation Filters
- 5 Star Rating Professor->
/fiveStarProfessors
- 1 star or less Rating Professor ->
/oneStarProfessors
- Search Best Professor By GPA->
/bestProfessortBYGPA
- recently added reviews within one days->
/recentReviews
- search by tags ->
/lowestProfessortBYGPA