Skip to content
mattiaslevin edited this page Jun 20, 2012 · 13 revisions

Entities per item:

  • AverageRating
  • Reviews
  • Likes
  • Favorites

##REST-end points

###AverageRatings

  • rateItem; rate a sigle item
  • getAverageRatingForItem; get the average rating for a single item (this is needed for a detail view)
  • getAverageRatingForItems; get average rating for a list of items (this is need for a list view)
  • getMyRatings; Get all the ratings and for items I have rated. Will return the average ratings as well
  • getTopAverageRatings; Get top X average ratings
  • getTopNearbyAverageRatings; Get top X average ratings with Z radius

We should only return average ratings (except for my ratings)

###Reviews

  • reviewItem; Write a review comment
  • deleteReview; Delete reivew
  • getReviewsForItem; Get all reviews for a single item (needed for a details view)
  • getMyReviews; Get all the reviews I have written for an item

I think normally your will rate and review an item as separate operations. Can ofc be the same method anyway.

###Likes

  • likeItem
  • getLikesForItem
  • getLikesForItems
  • getMostLikedItems
  • getMostLikedItemsNearby
  • getMyLikes

###Favorites

  • addToMyFavorites
  • getMyFavorites

###Location tagging Rate, review and like methods provide an optional lat and long that is the products lat and lon, not the devices position. The position is need to support the nearby methods.

###Anonymous ratings Rate, review and like methods provide an optional user id. This id is used in the getMy methods.

When registering for a domain in the backend there should be checkbox to decide if the same user can rate, review and link the same item more then once.

##Use cases Two main application use cases:

Show in list view

Must support returning a list of items with the following data for each item

  • Average rating and total number of ratings (not individual ratings)
  • Number of reviews (not each review)
  • Number of likes Maybe provide the option so application can specify if the backend should return number of reviews and number of likes or not.

Show in details view

Return all information about an items:

  • Average rating and number of ratings
  • Number of reviews and all reviews
  • Number of likes Maybe provide the option so application can specify if the backend should return reviews and likes or not.

Clone this wiki locally