This module will implement the logic and the necessary requests between client and server modules for the feed module.
Users can add new posts and new questions. These 2 are very similar and will be implemented in the same module.
Next is described how questions manipulation is implemented and similar will be for posts. Basically posts will have the same body but with a different type parameter.
Questions
getQuestions is a HTTP GET request which returns a list with all the questions from a city
getQuestionDetails is a HTTP GET request which returns details for a specific question. This should be used when a user is interested in a specific questions and wants to see for example all comments for that questions etc.
updateQuestion is HTTP POST request which can do multiple operations for a specific question.
The operations a user can do for a specific questions are:
ADD questionRequest examplehttp://localhost:8094/updateQuestion
and the body which is application/json
{
"city": "bucharest",
"type": "question",
"md5KeyAuthor": "a7e726de9b7e85e5c1f52bf056fd5267",
"timeStamp": "3 Jun 2008 11:05",
"title": "What are some interesting things to do in the city?",
"qid": "60390c7e429e38e8449519011a24f79d",
"operation": "add"
}
REMOVE questionRequest examplehttp://localhost:8094/updateQuestion
and the body which is application/json
This module will implement the logic and the necessary requests between client and server modules for the feed module.
Users can add new posts and new questions. These 2 are very similar and will be implemented in the same module. Next is described how questions manipulation is implemented and similar will be for posts. Basically posts will have the same body but with a different type parameter.
Questions
Request example
http://localhost:8094/getQuestions?city=<city-name>&md5Key=<valid-md5-key>
Request example
http://localhost:8094/getQuestionDetails?city=<city-name>&qid=<question-id>&md5Key=<valid-md5-key>
The operations a user can do for a specific questions are:
http://localhost:8094/updateQuestion
and the body which isapplication/json
http://localhost:8094/updateQuestion
and the body which isapplication/json
http://localhost:8094/updateQuestion
and the body which isapplication/json
http://localhost:8094/updateQuestion
and the body which isapplication/json
http://localhost:8094/updateQuestion
and the body which isapplication/json
http://localhost:8094/updateQuestion
and the body which isapplication/json
http://localhost:8094/updateQuestion
and the body which isapplication/json
_ Posts
The implementation for the posts is the same as the one for the questions.