A Java project that utilizes RapidApi to search for series in a database and saves the retrieved data in JSON format.
This project consists of several Java classes that work together to perform the following tasks:
-
Main (
Main.java
):- Entry point for the application.
- Requests data for a specified series using RapidApi.
- Saves the retrieved data in JSON format.
- Deletes temporary files if in debug mode.
// Sample code snippet for deleting temporary files in debug mode boolean debug = true; if (debug) { DeleteFiles.deleteFiles(); }
-
DeleteFiles (
DeleteFiles.java
):- Deletes specific JSON files used for temporary storage.
-
GetDataJsonMovies (
GetDataJsonMovies.java
):- Extracts data from the Movies.json file, specifically for movies.
-
GetRatingJson (
GetRatingJson.java
):- Extracts rating data from the Rating.json file.
-
JsonUtils (
JsonUtils.java
):- Writes indented JSON data to a file.
- Provides additional functions for working with JSON data, such as extracting IDs and top 5 IDs.
-
RequestData (
RequestData.java
):- Requests series data from RapidApi, processes and stores it in JSON format.
- Extracts additional data, such as episodes, ratings, and top cast members.
- Saves each cast member's data in separate JSON files.
-
RequestDataEpisodes (
RequestDataEpisodes.java
):- Requests detailed data for each episode, including ratings and other information.
- Creates a combined JSON file containing information about episodes, including ratings.
-
RatingData (
RatingData.java
):- Represents rating data, including average rating and number of votes.
Clone the repository:
git clone https://github.com/Fuguety/MoviesDataBase.git
- Open
Main.java
and set theapiKey
variable with your RapidApi key. - Run the
Main
class to initiate the series data retrieval process. - Check the generated JSON files for the collected data.
- Java
- RapidApi key (Replace
"Key Here"
inMain.java
with your actual key)
Make sure to handle your RapidApi key securely and avoid sharing it publicly.
![]()
RapidApi
Make sure you are subscribed to this APIs (Free subscription also works): MoviesDataBase IMDB8 IMDB-com
This project is licensed under the MIT License.