cristighr1995 / Holiholic

A trip planner and travel guide application which offers activity suggestions and personalized day plans based on user’s preferences and profile.
Apache License 2.0
2 stars 0 forks source link

[HH-8][FEED] Save reviews to a guide #8

Closed cristighr1995 closed 5 years ago

cristighr1995 commented 5 years ago

For each guide users can add reviews as comments and/or reactions. Each guide has a guide profile which is linked to his user profile.

Next are described the requests to make these operations.

Reviews/Guide Profile

  1. getGuideProfile is a HTTP GET request which returns a list with all the posts (only with the last comment) from the guide profile and all the reactions for his profile.

Request example http://localhost:8094/getGuideProfile?city=<city-name>&uid=<valid-uid>&uidGuide=<valid-uid-for-guide>


  1. getGuideProfilePostDetails is a HTTP GET request which returns details for a specific post from the guide profile. This should be used when a user is interested in a specific post and wants to see for example all comments for that post etc.

Request example http://localhost:8094/getGuideProfilePostDetails?city=<city-name>&gpid=<guide-post-id>&uidCurrent=<valid-uid-current-user>&uidAuthor=<valid-uid-author>&uidGuide=<valid-uid-for-guide>


  1. updateFeed is HTTP POST request which can do multiple operations for a specific post.

The operations a user can do for a specific guide profile are:

Request example http://localhost:8094/updateFeed and the body which is application/json

{
  "city": "bucharest",
  "type": "question",
  "uidAuthor": "3f76818f507fe7eb6422bd0703c64c88",
  "uidCurrent": "3f76818f507fe7eb6422bd0703c64c88",
  "uidGuide": "7815696ecbf1c96e6894b779456d330e",
  "gpid": "60390c7e429e38e8449519011a24f79d",
  "operation": "edit",
  "editField": {
    "likes": {
      "operation": "add",
      "react": "like"
    }
  }
}
roxanamacarie commented 5 years ago

🥇