The Movie Database Support

I have a winform application (school project) that I want to display a movies description in. I just need to put in the movie name and get back a string with the description yet I can't seem to find a method that does this.

What am I missing and how do I accomplish this?

I'm usiing TMDbLib:

string APIKey = "MyKey";

            TMDbClient client = new TMDbClient(APIKey);
            SearchContainer<SearchMovie> results = client.SearchMovieAsync("007").Result;

            Movie movie = ???


            Console.WriteLine();

Thank you, -Rob

4 replies (on page 1 of 1)

Jump to last post

Hi Rob,

I can't help you with any specific code but a movie search will return an array object called results. You should iterate over that array for each result. Each result object contains an overview object which is what you're looking for. You can see what those responses look like in the documentation I just linked to.

"I can't help you with any specific code"

As it turns out, neither can the creator of the library I'm using. I emailed them and this was the response:

"You would want to look at searching then. Possibly even the Discovery method calls"

Everyone wants to write software, but nobody wants to tell people how to use it. I've looked at three libraries that have maybe 20 lines of documentation each.

Sorry, rant over.

Thank you Travis.

Assuming you're writing C# (I'm assuming you are since yo mentioned the TMDbLib lib) this library here, has some examples near the bottom of his readme that outlines a search and get results. That might be useful.

I've never written a single line of C# in my life so unfortunately, I can't contribute much beyond linking to some docs.

P.S. based on LordMike's GitHub page, which I didn't see before, he has a similar example.

TMDbClient client = new TMDbClient("APIKey");
SearchContainer<SearchMovie> results = client.SearchMovieAsync("007").Result;

Console.WriteLine($"Got {results.Results.Count:N0} of {results.TotalResults:N0} results");
foreach (SearchMovie result in results.Results)
    Console.WriteLine(result.Title);

That example is iterating over the results array, and writing the title to the console. Use Console.WriteLine(result.Overview); to get the overview.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login