RickAndMorty-Spring-API is a backend developed with Java and Spring Boot that implements a RESTful API to list data of characters from the Rick and Morty series. The project allows viewing character information and is prepared to be consumed by a separate front-end.
This service provides a robust base for integration with client interfaces that consume character data through endpoints.
- 🎯 Objective
- 🧑🏻💻 Credits
- 🛠️ Technologies Used
- 📂 Installation and Execution
- 📃 Endpoints
- 🤝 Contributing
- ⚖️ License
Create a RESTful API that allows consuming and viewing data of characters from the Rick and Morty series, providing endpoints to be used in the Angular front-end.
| Bruno Magno | |
| Paulo de Araujo | |
| Marcelo Mesquita | |
| Jonathan Rocha | |
| Klismans Nazário | |
| Leandro Oliveira |
- Clone the repository:
git clone https://github.com/Exploit-Experts/RickAndMorty-Spring-API.git- Navigate to the project directory:
cd RickAndMorty-Spring-API- Copile project
mvn clean install- Execute the jar
java -jar target/rickMorty-0.0.1-SNAPSHOT.jar
-
Characters
GET /characters- Retrieves all characters from the first page.GET /characters?page=1- Retrieves all characters from a specific page.GET /characters- Parameters:
sort(optional) - Sorts by a specific attribute (NAME_ASC,NAME_DESC,STATUS_ASC,STATUS_DESC).name(optional) - Filters characters by name.status(optional) - Filters characters by status (ALIVE,DEAD,UNKNOWN).species(optional) - Filters characters by species.type(optional) - Filters characters by type.gender(optional) - Filters characters by gender (FEMALE,MALE,GENDERLESS,UNKNOWN).
- Parameters:
GET /characters/{id}- Retrieves a specific character by ID.GET /characters/avatar/{id}.jpeg- Retrieves the avatar of a specific character by ID.
-
Episodes
GET /episodes- Retrieves all episodes from the first page.GET /episodes?page=2- Retrieves all episodes from a specific page.GET /episodes- Parameters:
name(optional) - Filters episodes by name.episode(optional) - Filters episodes by code (expected format:SXXEXX).sort(optional) - Sorts episodes by name (NAME_ASC,NAME_DESC) or episode code (EPISODE_CODE,EPISODE_CODE_DESC).
- Parameters:
GET /episodes/{id}- Retrieves a specific episode by ID.
-
Locations
GET /locations- Retrieves all locations from the first page.GET /locations?page=2- Retrieves all locations from a specific page.GET /locations- Parameters:
name(optional) - Filters locations by name.type(optional) - Filters locations by type.dimension(optional) - Filters locations by dimension.sort(optional) - Sorts locations by name (NAME_ASC,NAME_DESC), type (TYPE_ASC,TYPE_DESC), or dimension (DIMENSION_ASC,DIMENSION_DESC).
- Parameters:
GET /locations/{id}- Retrieves a specific location by ID.
-
Users
POST /users- Registers a user by ID.PUT /users/{id}- Fully updates user data.PATCH /users/{id}- Partially updates user data by ID.DELETE /users/{id}- (soft delete) Deletes the user by ID.
-
Favorites
POST /favorites- Registers a favorite and associates it with a user.GET /favorites/{userId}- Retrieves all favorites for a specific user.- Parameters:
page(optional, default: 0) - The page number to retrieve.size(optional, default: 10) - The number of items per page.sort(optional, default: "asc") - Sorts by ID in ascending or descending order.
- Parameters:
DELETE /favorites/{userId}/{favoriteId}- Removes a specific favorite for a user.DELETE /favorites/{userId}- Removes all favorites for a user.
The API documentation is available via Swagger. You can access it by navigating to the following URL after running the application: http://localhost:8080/swagger-ui/index.html
This documentation provides a detailed description of all available endpoints, their parameters, and responses, making it easier to understand and interact with the API.
We welcome contributions from the open-source community. If you have any ideas, bug fixes, or feature requests, feel free to submit a pull request.
- Implement the remaining endpoints.
- Implement the remaining users and favorites operations.
- Implement the remaining features.
This project is licensed under the MIT License. See the LICENSE file for more information.