The Movie Database Support

I'm very new to APIs and jQuery in general and am trying to work out how to simply retrieve a movie poster.

$.getJSON("https://api.themoviedb.org/3/search/movie?api_key=XXXX&query=interstellar", function (response) {
      $("#poster").html("<img src=" + response.results[0].poster_path + "/>");
    });

I've also got a working jsFiddle here (link removed), but it's trying to retrieve this image from the jsFiddle website rather than tmdb. I realise I have to add something to start of that img src but have tried various combinations of (https://api.themoviedb.org/3/movie/157336/images + response.results[0].poster_path + ?api_key=XXXX) to no avail.

Could anyone point me in the right direction?

Any help is appreciated. Thanks!

P.S. While I may not have a working bit of code, this whole API thing is new to me and it's blowing my f****** mind!!! Oh, the possibilities...

1 reply (on page 1 of 1)

Jump to last post

Sorry to sound silly. But where do I get the base_url and poster_size from?

Can't find a movie or TV show? Login to create it.

ყველგან

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

მედიის გვერდზე

b go back (or to parent when applicable)
e go to edit page

ტელევიზიის სეზონების გვერდზე

(right arrow) go to next season
(left arrow) go to previous season

ტელევიზიის ეპიზოდების გვერდზე

(right arrow) go to next episode
(left arrow) go to previous episode

გამოსახულებების გვერდზე

a open add image window

რედაქტირების ყველა გვერდზე

t open translation selector
ctrl+ s submit form

დისკუსიების გვერდზე

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

გსურთ შეაფასოთ ან დაამატოთ ეს ელემენტი სიაში?

ავტორიზაცია