Skip to content
Luigi Minardi edited this page Mar 3, 2022 · 14 revisions

Welcome to the movieClubBackend documentation!

To see the instalation of the api check the README.

To use the deployed API, the base endpoint is https://lug-movie-club.herokuapp.com. When you see <path>:<port> on the documentation just think of it at the base endpoint.

Here we will show how each endpoint works, its responses and behaviors and who can access each of them.

I personally recommend you to take a look at this page and the installation (if willing to using locally) at README before start using the endpoints.

Table of contents

🏁 Gettin Started


🚩 Endpoints


Fields Acronyms dictionary

Those Acronyms are used on the field options column of the table (drawed in the documentation) that explain the fields of the tables (of the database).

field options term mean
unq unique the value of the field can't be repeated
!null not nullable the vaue of the field is obligatory
f++ auto increment the value of the field is incremented automatically
dft<val> default value the value said in <val> is setted by default in the field if no value is passed
auto automatic the ORM manage this field and you don't need to pass a value to it. (if you pass some value you may cause a bug so take care)
pk primary key is a unique key that identifies a table
fk foreign key is a unique key from other table that identifies a relationship between two tables
hashed encrypted the value of the field is encrypted by the api

Endpoints Acronyms dictionary

Those Acronyms are used on the path and check columns of the tables that explain the endpoints.

option behavior
auth check if the user token is valid, if so, allows user to access endpoint
adm check if the user is admin, if so, allows user to access endpoint
+18 check if user is adult, if so, allows user to access endpoint
:<val><type> endpoint with param, the param name and type may vary, the type isn't passed when using, it's just for explain the bahaviour

TODO

  • - Movies Endpoints
  • - Orders Endpoints
  • - Movie-DB Endpoints
    • - GET

While the beautiful way of them is not made i'll mantain this table with the basic of their endpoints

Movie Database Endpoints

The default endpoint is <path>:<port>/movie-db.

method function path query param
GET search movie in the movie-db /search ?q=<search>
GET return upcomming movies from the movie-db /new
GET return last movie added in the movie-db /latest
GET return movies with best rating of the movie-db /top-rated
GET get movies that are similar to movie with pk in the movie-db /similar-to/:pk<integer>
GET return movie from the movie-db with pk /:pk<integer>
GET return reviews from the movie with specified pk /:pk<integer>/reviews