The Movie Database podpora

Hey guys, I'm sort of a newbie and I've been playing around with the methods of the api and I'm slowly starting to understand the flow. But what i just cant seem to get is how you can display images of movies that a user searches for. I've read the docs several times and its still not clicking for me..So heres what I got so far. (using react)

axios.get('https://api.themoviedb.org/3/search/movie?query='+input+'&api_key={API_KEY}').then(
      (response) => {
        console.log(response)
      })
      .catch((error)=>{
        console.log(error);
      })
  }

the 'input' is the value of whatever the user types in, and from this I'm getting data back which is good. But, I cant seem to understand how you attach on the image url to this so it shows the image along side whatever data i want to grab along with it. I've been seeing the image base url examples like > https://image.tmdb.org/t/p/w500/kqjL17yufvn9OVLyXYpvtyrFfak.jpg but I'm still highly confused on how to put two and two together. Would I need to add it to my query string or something of that sort? I'm so lost lol. Any help is greatly appreciated.

1 odpoveď (na strane 1 z 1)

Jump to last post

Hi there,

This document outlines the basics for how to create image paths. There's also this example jQuery page I have that shows a simple example of querying a page on the API and showing the results.

Nemôžeš nájsť film alebo seriál? Prihlás sa a pridaj ho.

Globálne

s zamerať sa na vyhľadávací riadok
p otvoriť menu profilu
esc zatvoriť otvorené okno
? otvoriť okno klávesových skratiek

Na média stránkach

b ísť späť (do rodičovského pokiaľ možno)
e íst na stránku úprav

Na stránkach seriálových serií

(pravá šípka) ísť na nasledujúcu sériu
(ľavá šípka) ísť na predchádzajúcu sériu

Na stránkach seriálových epizód

(pravá šípka) ísť na nasledujúcu epizódu
(ľavá šipka) isť na predchádzajúcu epizódu

Na všetkých obrázkových strankach

a otvoriť okno pre pridanie obrázku

Na všetkých stránkach úprav

t otvoriť výber prekladu
ctrl+ s odoslať formulár

Na stránkach diskusií

n vytvoriť novú diskusiu
w prepínač stavu pozerania
p prepínač verejný/súkromný
c prepínač zatvorený/otvorený
a otvoriť aktivitu
r odpovedať v diskusií
l ísť na poslednú odpoveď
ctrl+ enter odoslať vašu správu
(pravá šípka) nasledujúca strana
(ľavá šípka) predchádzajúca strana

Nastavenia

Chcete ohodnotiť alebo pridať túto položku do zoznamu?

Prihlásiť sa