Soporte de The Movie Database

Hi all. First of all thanks for all the hard work to the people here at themoviedb.org for your API. I'm using the php wrapper by glamorous and I was wondering if there was an elegant way to catch when it doesn't get a result? right now it's breaking my layout when I try to find something that doesn't exist, etc. Thanks

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

Jump to last post

Hi stereotyped,

I can't provide you specific help with that wrapper but empty results are just an empty results array:

https://api.themoviedb.org/3/search/movie?api_key=###&query=kjhkjhkjh

You should be able to just check for an empty array and conditionally show your results or some kind of "nothing found" message.

Cheers.

https://github.com/glamorous/TMDb-PHP-API

This is what i'm using. Maybe someone else can help me with it. The problem is it doesn't return an empty array but it throws an exception which i'm unsure of how to check that :/

¿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