Updated on September 14, 2023

Top movies of the week

DEPRECATED

⚠️ Deprecated Notice: The "Top Movies of the Week" query has been deprecated in favor of the Featured movies query. It is recommended to use the "Featured Movies" query to discover the most popular movies of the week. This document provides information about the deprecated query for reference purposes.

Endpoint

To retrieve the top movies of the week, you can make a GET request to the following endpoint:

GET /movies/top

Please note that this query is deprecated, and it's recommended to use the /movies/featured endpoint for the latest and most popular movies of the week.

Request

Here's an example of how to make a GET request to retrieve the top movies of the week using JavaScript:

const apiUrl = "https://api.monolitomovies.com/v1/movies/top";

fetch(apiUrl)
  .then(response => response.json())
  .then(data => {
    console.log("Top Movies of the Week (Deprecated):", data);
  })
  .catch(error => {
    console.error("Error:", error);
  });

In this example, we use the fetch function to make an HTTP GET request to the /movies/top endpoint, which provides a list of top-rated movies of the week.

Response

The API will respond with a list of top movies of the week in JSON format. Each movie object includes details such as the movie's title, release date, genre, director, actors, plot, and rating.

Here's an example response with a list of top movies of the week:

[
  {
    "id": 54321,
    "title": "Inception",
    "release_date": "2010-07-16",
    "genre": ["Action", "Adventure", "Sci-Fi"],
    "director": "Christopher Nolan",
    "actors": ["Leonardo DiCaprio", "Joseph Gordon-Levitt"],
    "plot": "A thief who enters the dreams of others to steal their secrets faces a new challenge: planting an idea in a CEO's mind.",
    "rating": 8.8
  },
  {
    "id": 98765,
    "title": "The Dark Knight",
    "release_date": "2008-07-18",
    "genre": ["Action", "Crime", "Drama"],
    "director": "Christopher Nolan",
    "actors": ["Christian Bale", "Heath Ledger"],
    "plot": "When the menace known as The Joker emerges, Batman must confront one of the greatest psychological tests of his ability to fight injustice.",
    "rating": 9.0
  }
]

Response Explanation

Each movie object in the response includes the following properties:

  • id: The unique identifier of the movie.

  • title: The title of the movie.

  • release_date: The release date of the movie.

  • genre: An array of genres associated with the movie.

  • director: The director of the movie.

  • actors: An array of actors in the movie.

  • plot: A brief description of the movie's plot.

  • rating: The average user rating for the movie.

Please note that this query is deprecated, and it's recommended to use the Featured movies query for up-to-date information on the most popular movies of the week.