Skip to content

submarinerich/trophy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

rating and favorites service in scala and postgres

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published