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
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by Travis Bell
on April 23, 2017 at 11:33 AM
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 anoverview
object which is what you're looking for. You can see what those responses look like in the documentation I just linked to.Reply by rmnrdi
on April 23, 2017 at 11:40 AM
"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.
Reply by Travis Bell
on April 23, 2017 at 11:45 AM
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.
Reply by Travis Bell
on April 23, 2017 at 11:49 AM
P.S. based on LordMike's GitHub page, which I didn't see before, he has a similar example.
That example is iterating over the results array, and writing the title to the console. Use
Console.WriteLine(result.Overview);
to get the overview.