Soporte de The Movie Database

Hi Im currently writing a function within a programm where i would like to display a picture of an actor. since i have invalid actor ID' s and cant change the dataset im using, i need to search them by name where i recive a json object which looks somewhat like that:

{
    "page": 1,
    "results": [
        {
            "adult": false,
            "gender": 2,
            "id": 2458619,
            "known_for_department": "Acting",
            "name": "Chino 'Fats' Williams",
            "original_name": "Chino 'Fats' Williams",
            "popularity": 4.205,
            "profile_path": "/uBjys56191sxDRo8qPaBPwJpUfX.jpg",
            "known_for": [
                {
                    "adult": false,
                    "backdrop_path": "/wh4ze6klUbeichAj603OKZwY1W5.jpg",
                    "id": 218,
                    "title": "The Terminator",
                    "original_language": "en",
                    "original_title": "The Terminator",
                    "overview": "In the post-apocalyptic future, reigning tyrannical supercomputers teleport a cyborg assassin known as the \"Terminator\" back to 1984 to kill Sarah Connor, whose unborn son is destined to lead insurgents against 21st century mechanical hegemony. Meanwhile, the human-resistance movement dispatches a lone warrior to safeguard Sarah. Can he stop the virtually indestructible killing machine?",
                    "poster_path": "/hzXSE66v6KthZ8nPoLZmsi2G05j.jpg",
                    "media_type": "movie",
                    "genre_ids": [
                        28,
                        53,
                        878
                    ],
                    "popularity": 52.657,
                    "release_date": "1984-10-26",
                    "video": false,
                    "vote_average": 7.642,
                    "vote_count": 11633
                },
                {
                    "adult": false,
                    "backdrop_path": "/1T7d8EuYnpZRc3yHxqa3vipZ2DE.jpg",
                    "id": 1371,
                    "title": "Rocky III",
                    "original_language": "en",
                    "original_title": "Rocky III",
                    "overview": "Now the world champion, Rocky Balboa is living in luxury and only fighting opponents who pose no threat to him in the ring, until Clubber Lang challenges him to a bout. After taking a pounding from Lang, the humbled champ turns to former bitter rival Apollo Creed for a rematch with Lang.",
                    "poster_path": "/3avfzaUDxMieyEgGPopVvh8ABXR.jpg",
                    "media_type": "movie",
                    "genre_ids": [
                        18
                    ],
                    "popularity": 42.018,
                    "release_date": "1982-05-28",
                    "video": false,
                    "vote_average": 6.866,
                    "vote_count": 3654
                },
                {
                    "adult": false,
                    "backdrop_path": "/jOWqY02m10vDRYHhYGivgV10OtZ.jpg",
                    "id": 11814,
                    "title": "Weird Science",
                    "original_language": "en",
                    "original_title": "Weird Science",
                    "overview": "Two unpopular teenagers, Gary and Wyatt, fail at all attempts to be accepted by their peers. Their desperation to be liked leads them to \"create\" a woman via their computer. Their living and breathing creation is a gorgeous woman, Lisa, whose purpose is to boost their confidence level by putting them into situations which require Gary and Wyatt to act like men.",
                    "poster_path": "/jaEauZd2joSAKn42D83gm3S0y3F.jpg",
                    "media_type": "movie",
                    "genre_ids": [
                        35,
                        10749,
                        878
                    ],
                    "popularity": 18.433,
                    "release_date": "1985-08-01",
                    "video": false,
                    "vote_average": 6.534,
                    "vote_count": 1220
                }
            ]
        }
    ],
    "total_pages": 1,
    "total_results": 1
}

I am only interested in the profile_path but have tried for hours to access that and cant get it done. I need to utilize angular > v6.0

thanks in advance Benedict Grünberg

1 respuesta (en la página 1 de 1)

Jump to last post

Hi @bt718936, this document describes how to construct a correct path for an image.

For example, the profile_path from your output in original size:

http://image.tmdb.org/t/p/original/uBjys56191sxDRo8qPaBPwJpUfX.jpg

¿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