A basic RESTful API built with Symfony 6 framework, managing movies and their related genres and countries.
This project provides CRUD operations on three main entities:
- Movie: Represents a film with its details.
- Genre: Represents a film genre, e.g., Action, Comedy, Drama.
- Country: Represents a country where the movie was produced.
GET /movies: Retrieve a list of all movies.GET /movies/pagination?page={num}&limit={num}&title={string}: Retrieve a paginated list of movies with title search filter.GET /movies/{id}: Retrieve a movie by its ID.GET /movies/by-genre/{genre}: Retrieve movies by genre.GET /movies/by-country/{country}: Retrieve movies by country.GET /movies/by-genre-and-country/{genre}/{country}: Retrieve movies by both genre and country.POST /movies: Create a new movie.PUT /movies/{id}: Update an existing movie by its ID.DELETE /movies/{id}: Delete a movie by its ID.
(Endpoints for Genre entity are not provided in the given code, but here's a suggested structure):
GET /genres: Retrieve a list of all genres.GET /genres/{id}: Retrieve a genre by its ID.POST /genres: Create a new genre.PUT /genres/{id}: Update a genre by its ID.DELETE /genres/{id}: Delete a genre by its ID.
(Endpoints for Country entity are not provided in the given code. Here's a suggested structure):
GET /countries: Retrieve a list of all countries.GET /countries/{id}: Retrieve a country by its ID.POST /countries: Create a new country.PUT /countries/{id}: Update a country by its ID.DELETE /countries/{id}: Delete a country by its ID.
- Clone the repository:
git clone [repository_url]. - Navigate to the project directory:
cd project_directory. - Install the dependencies:
composer install. - Set up your environment variables in
.envor.env.local. - Run the database migrations:
bin/console doctrine:migrations:migrate. - Start the Symfony development server:
symfony server:start.