Skip to content

Latest commit

 

History

History
70 lines (38 loc) · 1.2 KB

README.mkd

File metadata and controls

70 lines (38 loc) · 1.2 KB

Trophy Service

How To Run

  • assumes postgres/you've run the bootstrap.sql file
  • you should straighten out your usernames/passwords

Passwords are located at:

src/main/scala/com/submarinerich/service/trophy/TrophyService.scala:37

Then you start up with:

rake run

It will run on port 8085, and you can see what api options are available.

the api available will be at http://localhost:8085/

API documentation

GET /

POST /fav

make a new favorite

params:
    source (required: Long)
    destination (required: Long)
    category (optional: Long)

POST /unfav

unfavorite something

params:
    source (required: Long)
    destination (required: Long)
    category (optional: Long)

GET /favorites/ source

get all the items that source has favorited where source is a Long

POST /rate

rate something

params:
    source (required: Long)
    destination (required: Long)
    rating (required: Long)

GET /favorites/ item /count

see how many favorites an item has

GET /ratings/ item /count

see how many ratings an item has

GET /ratings/ item /average

get the average rating for item