پشتیبانی پایگاه داده‌ فیلم

Hi! I'm writing a method that fetches the poster for a movie based on the movie's ID (such as 505.

My only question is, how do I get this ID?

In this scenario, the user would enter a title or pick a title from a list (such as The Hobbit: The Desolation of Smaug (2013))

What I need is an API or way of getting an ID from that title that I can use to get the poster.

I already have the method and API call for getting the poster written. All I need is a way to translate that title into an ID.

Thanks in advance!

1 پاسخ (در صفحه 1 از 1)

Jump to last post

Hi sammydogbro,

You would want to look at the search method. Knowing the title of say, "The Hobbit: The Desolation of Smaug" you can search like so:

http://api.themoviedb.org/3/search/movie?api_key=###&query=The+Hobbit:+The+Desolation+of+Smaug

You can be more precise if you know the year:

http://api.themoviedb.org/3/search/movie?api_key=###&query=The+Hobbit:+The+Desolation+of+Smaug&year=2013

You can then grab the results from the results array and parse out the ID.

Cheers.

فیلم و نمایش تلویزیونی را نمی‌توانید پیدا کنید؟ به سیستم وارد شوید تا آن را ایجاد کنید.

Global

s تمرکز بر منوی جستجو
p منوی پروفایل باز شود
esc بستن پنجره باز
? پنجره میانبرهای صفحه‌کلید باز شود

در صفحات مدیا

b بازگشت به عقب (یا در صورت لزوم به منشا)
e برو به صفحه ویرایش

در صفحات فصل تلویزیونی

(فلش سمت راست) برو به فصل بعد
(پیکان سمت چپ) برو به نشست قبلی

در صفحات قسمت تلویزیونی

(فلش سمت راست) برو به قسمت بعد
(پیکان سمت چپ) برو به قسمت قبلی

در تمام صفحات تصویر

a پنجره افزودن تصویر باز شود

در تمام صفحات ویرایش

t انتخابگر ترجمه باز شود
ctrl+ s ثبت از

در صفحات بحث

n ایجاد بحث جدید
w تغییر وضعیت وضعیت تماشا
p تغییر وضعیت عمومی/خصوصی
c تغییر وضعیت بسته/باز
a گشایش صفحه فعالیت
r پاسخ به بحث
l برو به آخرین پاسخ
ctrl+ enter پیام خود را ثبت کنید
(فلش سمت راست) صفحه بعد
(پیکان سمت چپ) صفحه قبلی

تنظیمات

آیا می‌خواهید به این مورد امتیاز دهید یا به فهرست اضافه کنید؟

ورود