Giter Club home page Giter Club logo

my-catalog's Introduction

My Catalog

My-Catalog CI

Spring IntelliJ IDEA Java

An application to register movies and tv shows watched. ๐ŸŽฌ๐Ÿฟ

Author โœ๏ธ: Gabriel Pivoto

If you want, you can download the files:

Dowload Dowload Dowload

This application consumes the OMDB API.

What is needed ๐Ÿงพ


Starting โ–ถ๏ธ

  • Clone the repository:
https://github.com/GabrielPivoto/my-catalog.git
  • Create the network:
docker network create inatel
  • Start the MySql container:
docker container run --name mysql --network=inatel -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=my_catalog_db -p 3306:3306 -p 33060:33060 -d mysql

Now run the project in your IDE, and you're good to go.

Starting with the Docker Compose ๐Ÿ‹

  • Clone the repository
  • At the root of the project, run the command:
mvn clean install -DskipTests
  • Also at the root of the project, build the application image:
docker build -t my-catalog .
  • Run the Docker Compose file:
docker compose up

How it works โš™๏ธ

In this application, the user can register all movies and series he have already watched. It is possible to register a new movie/series; search movies and series that are registered; update movie/series; delete movie/series.

๐ŸŽฅ To add a new movie/series:

  • POST http://localhost:8080/show - requires the following body:
{
    "title": "showTitle",
    "personalScore": score
}

๐ŸŽฅ To get all movies/series registered:

  • GET http://localhost:8080/show
  • GET http://localhost:8080/show/id - gets a show by specific id
  • GET http://localhost:8080/show?type=movie - gets all movies registered
  • GET http://localhost:8080/show?type=series - gets all series registered

๐ŸŽฅ To update a movie/series:

  • PATCH http://localhost:8080/show - requires the following body and updates only the personal score.
{
    "title": "showTitle",
    "personalScore": score
}

๐ŸŽฅ To remove a movie/series:

  • DELETE http://localhost:8080/show/id - deletes a show by specific id

Tests ๐Ÿงช

There are two test classes in the project: ShowControllerTest and ShowServiceTest . You can either run them from your IDE or run the following command at the root of the project:

mvn test

There's also two feature files regarding the methods GET and POST. To run these tests you just need to run the CucumberRunnerTests class. The test report can be accessed through this link: http://bit.ly/3IAalzy

my-catalog's People

Contributors

gabrielpivoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

my-catalog's Issues

Teste

Good job here

public static ShowDto convertEntityToDto(TvShow tvShow) {
return ShowDto.builder()
.actors(tvShow.getActors())
.id(tvShow.getId())
.personalScore(tvShow.getPersonalScore())
.director(tvShow.getDirector())
.title(tvShow.getTitle())
.genre(tvShow.getGenre())
.imdbRating(tvShow.getImdbRating())
.plot(tvShow.getPlot())
.rated(tvShow.getRated())
.released(tvShow.getReleased())
.type(tvShow.getType())
.writer(tvShow.getWriter())
.build();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.