Rguarascia
Rguarascia

Reputation: 193

WatTmdb api get movie id

I have a program that gets the movie title from a search and I would now like to get the TMDB ID from the movie title. I am using wattmdb My current code is:

MovieTitle = txtMovieTitle.Text;
List<MovieResult> queryMovie = new List<MovieResult>();
  try
    {
     queryMovie = API.SearchMovie(MovieTitle, 1).results;
    }
    catch (ArgumentException) { }
    listBox1.DataSource = queryMovie;

I am trying to extract the TMDB ID from the searched movie, I have looked on the documentation page and there is no title to id parser. So any help would be lovely. The link is here.

Upvotes: 0

Views: 276

Answers (1)

watway
watway

Reputation: 1

The TMDB ID is included in the response to call to SearchMovie. In your sample code the title and the id members are included in each MovieResult object in the queryMovie list.

Upvotes: 0

Related Questions