MovieHub backend inhert from repo/webBootstrap
- koa2
- sequelize (mysql)
Currently without Session Auth
{ "cusname": name, "cuspassword": password }
- 200 Success
- 201 Failed
- 400 Error
{ "cusname": name, "cusemail": email, "cuspassword": password, "cusPortraitUrl": url }
- 200 Success
- 400 Error
{ "cusname": name, "cusemail": email, "cuspassword": password, "cusPortraitUrl": url }
- 200 Success
- 400 Error
{ "cusname": name, "cuspassword": password, }
- 200 Success
- 205 Unmatched or Same Password
- 400 Error
{ "cusname": name }
- 200 Success
- 205 Unmatched
- 400 Error
{ "cusname": name "cusPortraitUrl": url }
- 200 Success
- 205 Unmatched
- 400 Error
Return all user ratings via cusid.
{ "cusid": User Id(MUST) }
- 200 Success
- 400 Error
{ "movid": movid, "movname": movie name, "movyear": movie year(INT), "genre": genre, "director": director, "description": description, "movTrailerUrl": movTrailerUrl "movScreenshotUrl": movScreenshotUrl }
- 200 Success
- 400 Error
{ "movid": movid, }
- 200 Success
- 205 Unmatched or Same Password
- 400 Error
{ "movid": movid }
- 200 Success
- 205 Unmatched
- 400 Error
{ "movid": movid (MUST) "movname": movie name (OPTIONAL), "movyear": movie year (OPTIONAL), " }
- 200 Success
- 205 Unmatched
- 400 Error
Return all Movie Genres
- 200 Success
- 205 Unmatched
- 400 Error
Return data orders by movid.
Trick: When first time to fetch, movid=-1 can get movid > -1 rows. Then you can get every count number of rows by passing last movid
Return not more than count number of rows data.
{ "movid": movid (MUST), "genre": genre (MUST), "count": count(MUST) }
- 200 Success
- 400 Error
Return most recently count numbers movie by movyear.
{ "count": count(MUST) }
- 200 Success
- 400 Error
Return data orders by movid.
Trick: When first time to fetch, movid=-1 can get movid > -1 rows. Then you can get every count number of rows by passing last movid
Return not more than count number of rows data.
{ "movid": movid (MUST), "movname": movname (MUST or Partial Name), "count": count(MUST) }
- 200 Success
- 400 Error
{ "movid": movie id(MUST), "cusid": customer id(MUST), "rating": rating (MUST, INT 0 - 10) }
- 200 Success
- 400 Error
{ "movid": movie id(MUST), "cusid": customer id(MUST) }
- 200 Success
- 205 Unmatched
- 400 Error
{ "movid": movie id(MUST), "cusid": customer id(MUST), "rating": rating(MUST, INT 0-10) }
- 200 Success
- 205 Unmatched Or still same rating
- 400 Error
Return all ratings of a movie using Group By.
You can use this to get 0-10 rating total and calculate average rating.
{ "movid": movie id(MUST), "rating": rating(MUST, INT 0-10) }
- 200 Success
- 400 Error
Return recommend movies according userId.
{ "userId": User Id(MUST) }
- 200 Success
- 400 Error