본문 바로가기

프로그래밍/영화 TMDB API

영화 정보 앱 만들기 - TMDB API 사용법, Find

TMDB API 활용 예제 앱입니다.

https://play.google.com/store/apps/details?id=com.enigmah2k.movieinfo

 

영화정보 - Google Play 앱

영화 또는 TV 시리즈 정보를 검색할 수 있습니다. TMDB API를 사용하여 만들었습니다. 한국에 소개되지 않은 컨텐츠를 찾을 수 있습니다.

play.google.com

 

TMDB API - Find

TMDB가 아닌 외부 데이터베이스의 정보를 가져올 수 있습니다.

외부 데이터를 가져오기 위해서는 {external_id} 값이 필요합니다.

{external_id} 값은 아래 API 들을 통해서 얻을 수 있습니다.

 

Movies - Get External IDs

People - Get External IDs

TV - Get External IDs

TV Seasons - Get External IDs

TV Episodes - Get External IDs

 

 

다음은 지원하는 외부 Databases 입니다.

 

Media Databases

  Movies TV Shows TV Seasons TV Episodes People
IMDb ID
TVDB ID
Freebase MID*
Freebase ID*
TVRage ID*

Social IDs

  Movies TV Shows TV Seasons TV Episodes People
Facebook
Instagram
Twitter

 

 

아래 링크가 Find 관련 API 상세입니다.

https://developers.themoviedb.org/3/find/find-by-id

 

각 API에 대해 알아보겠습니다.

 

=============================================

< API 설명 >

1. Find by ID

외부 데이터베이스의 정보를 {external_id} 값으로 가져올 수 있습니다.

아래와 같이 호출하면 상세정보를 얻을 수 있습니다.

https://api.themoviedb.org/3/find/{external_id}?api_key=<<api_key>>&external_source=imdb_id

{"movie_results":[{"id":550,"video":false,"vote_count":20448,"vote_average":8.4,"title":"Fight Club","release_date":"1999-10-15","original_language":"en","original_title":"Fight Club","genre_ids":[18],"backdrop_path":"/rr7E0NoGKxvbkb89eR1GwfoYjpA.jpg","adult":false,"overview":"A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.","poster_path":"/2z8mFQrT0ESSytWZqro1jsCbvCC.jpg","popularity":41.162}],"person_results":[],"tv_results":[],"tv_episode_results":[],"tv_season_results":[]}

 

아래는 응답 결과 입니다.

{
  "movie_results": [
    {
      "adult": false,
      "backdrop_path": null,
      "genre_ids": [
        35
      ],
      "id": 12,
      "original_language": "en",
      "original_title": "Finding Nemo",
      "overview": "A tale which follows the comedic and eventful journeys of two fish, the fretful Marlin and his young son Nemo, who are separated from each other in the Great Barrier Reef when Nemo is unexpectedly taken from his home and thrust into a fish tank in a dentist's office overlooking Sydney Harbor. Buoyed by the companionship of a friendly but forgetful fish named Dory, the overly cautious Marlin embarks on a dangerous trek and finds himself the unlikely hero of an epic journey to rescue his son.",
      "release_date": "2003-05-30",
      "poster_path": null,
      "popularity": 1.256412,
      "title": "Finding Nemo",
      "video": false,
      "vote_average": 7.2,
      "vote_count": 2317
    }
  ],
  "person_results": [],
  "tv_results": [],
  "tv_episode_results": [],
  "tv_season_results": []
}

 

 

 

반응형