The Movie Database サポート

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?

映画やテレビ番組が見つかりませんか?ログインして作成してください。

全般

s 検索バーに移動する
p プロファイルメニューを開く
esc 開いているウィンドウを閉じる
? キーボードショートカットウィンドウを開く

メディアのページ

b 戻る(または該当する場合は親に)
e 編集ページに行く

テレビ番組のシーズンのページ

(右矢印)次のシーズンに行く
(左矢印)前のシーズンに戻る

テレビ番組のエピソードのページ

(右矢印)次のエピソードに進む
(左矢印)前のエピソードに戻る

全ての画像のページ

a 画像追加ウィンドウを開く

全ての編集ページ

t 翻訳選択を開く
ctrl+ s フォームを送信する

ディスカッションのページ

n 新しいディスカッションを作成する
w 監視ステータスを切り替える
p 公開/非公開を切り替える
c 閉じる/開くを切り替える
a アクティビティを開く
r ディスカッションに返信
l 最後の返事に行く
ctrl+ enter メッセージを送信する
(右矢印)次のページ
(左矢印)前のページ

設定

このアイテムを評価したり、リストに追加したりしたいですか?

ログイン

メンバーではありませんか?

登録してコミュニティに参加