Soporte de The Movie Database

The documentation doesn't specify. It only says json. I assumed it was the id of the movie or TV series but that didn't work. Here is what I tried {"id": 12}. I even tried adding quotations marks around the numbers without success. That id exists, it leads to Finding Nemo. However it doesn't work.

2 respuestas (en la página 1 de 1)

Jump to last post

@HelloUser000 said:

Here is what I tried {"id": 12}.

You need three key-value pair element,

{
   media_type: 'movie', 
   media_id: 11, 
   watchlist: true
}

To get request JSON body follow this steps:

  1. Go to (click this)
  2. On right side, select your perefered language programming
  3. On dropdown REQUEST EXAMPLE just click REQUEST EXAMPLE
  4. For example I choose Node and using FETCH REQUEST, the output on the box area will be
const url = 'https://api.themoviedb.org/3/account/21457174/watchlist';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    Authorization: 'Bearer {{YOUR_API_READ_ACCESS_TOKEN}}'
  },
  body: JSON.stringify({media_type: 'movie', media_id: 11, watchlist: true})
};
fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));

you can see the json body is:

...
body: JSON.stringify({media_type: 'movie', media_id: 11, watchlist: true})
...

Thanks

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de debate

n crear nuevo debate
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder al debate
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión