MoodCat / MoodCat.me-Core

Welcome to MoodCat.me, the music platform of the future, available today. Join us in the adventure of finding and enjoying music geared to you!
http://moodcat.me
MIT License
3 stars 2 forks source link

Make points available (backend) #129

Closed eanker closed 9 years ago

GijsWeterings commented 9 years ago

@GET - localhost:8080/api/users/{id}/points -> returns integer value of points @POST - localhost:8080/api/users/{id}/points?amount=X -> updates value, X defaults to 0

GijsWeterings commented 9 years ago

@Azkle is this an acceptable schema for you?

eanker commented 9 years ago

Looks good, I think this will work.

jwgmeligmeyling commented 9 years ago

Why would we want to have an end point to award points? Isn't this guarded by the system?

TimvdLippe commented 9 years ago

I don't think POST-ing points is valid as it can indeed be misused, however the GET is reasonable. You only want to award points on the backend for example in the SongAPI.toclassify() call

GijsWeterings commented 9 years ago

Since security isn't a critical factor in this system (contextproject, not a live product), I would like to keep this endpoint open for testability purposes. I do agree this shouldn't be called by the system in everyday usage, but testing achievements for example may be easier this way.