キーボードショートカット
高度な検索
How can I get only the logo of the movies and tv I only want the logo like this => https://www.themoviedb.org/t/p/original/izvZm6zHyidvhktODSGjnOFldKu.png
Hi @elmanci2, are you asking about this on the API?
Yes
Ok, I've moved this post into the API forum.
You can get the logos by calling the /images method, and looking at the returned logos filed.
logos
Make sure to read the docs around images:
Hi! This is my solution for this problem, coded in Vue, but it's basically the same as any other js file :
const getImages = (movie_id) => { const images = ref([]); const main_logo = ref(""); const xhr = new XMLHttpRequest(); xhr.open("GET", `https://api.themoviedb.org/3/movie/${movie_id}/images?api_key=${env.apikey}`); xhr.onload = () => { images.value = JSON.parse(xhr.responseText).logos; // will return an array of logos in many different languages const en_logos = images.value.filter((logo) => { // takes only the English logo return logo.iso_639_1 == "en" }) main_logo.value = "https://image.tmdb.org/t/p/original/" + en_logos[0].file_path; } xhr.send(); return main_logo; } // Sample Function Call const main_logo = getImages("945961"); watchEffect(() => { console.log(main_logo.value); });
映画やテレビ番組が見つかりませんか?ログインして作成してください。
ログイン
登録する
このアイテムを評価したり、リストに追加したりしたいですか?
メンバーではありませんか?
登録してコミュニティに参加
Travis Bellからの返信
投稿:2023年07月20日 12:20 PM
Hi @elmanci2, are you asking about this on the API?
elmanci2からの返信
投稿:2023年07月20日 1:18 PM
Yes
Travis Bellからの返信
投稿:2023年07月20日 1:46 PM
Ok, I've moved this post into the API forum.
You can get the logos by calling the /images method, and looking at the returned
logos
filed.Make sure to read the docs around images:
maxmin2127からの返信
投稿:2024年08月21日 11:07 PM
Hi! This is my solution for this problem, coded in Vue, but it's basically the same as any other js file :