-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SearchByActorAsync wrong return type #5
Comments
That makes sense, I did this so a while back and can't remember what it returns. |
This is a simple fix. |
Having looked into this in more detail, this is what it returns
Passing in an actors name will return all actors that match eg. brad pi may return multiple results. Brad pitt on the other hand will return a single result. Point is if the user types in the correct name then thats ok, but what if they dont?? |
I will implement option 2 and see how that works. |
I think it would be easier to loop through on the found actors and extract every Movie from the results. |
Definitely easier. Are you happy with returning all movies for all actors found(even incorrect ones)? |
My idea not fully good because I thought like we would use it in MoodMovies. This library should return the deserialized response and the MoodMovies responsibility to extract only the movies from every actors / actresses. |
Yeah 100% agree. Moodmovies can implement point 2 that I mentioned above. |
Hi! Lucky for Us there is an another problem 😄 The response
My ideas:
class MixedSearchResults
{
public List<Movie> Movies { get; }
public List<TV> TvList{ get; }
} Do You have any other idea? |
Hi, I agree with your first point that sounds dirty. Your second point makes more sense but will that mean that one of those lists will be null when a query is run and returned to the user? Sorry I am a bit detached from this as havent worked with it for a while, did you find this out from the docs on TMDB? |
No, my religion deny using null-s 😄 I against using null-s no matter what. Ctor for initializing everything. In 2009 Tony Hoare (C.A.R. Hoare) stated that he invented the null reference in 1965 as part of the ALGOL W language. In that 2009 reference Hoare describes his invention as a "billion-dollar mistake":
Source: Wikipedia / Null pointer / History With the second implementation the |
Hahahah good one 👍 i think we can add a custom deserializer as long as we dont touch the already existing Json code. We can another method that can deserialize this tricky type. Are you up for the challenge? |
What do You mean by the Yes, You can assign this to me (but maybe it will take a few days to implement and commit it). |
Have you had any luck with this this? |
Hi! I will implement it today. Can I implement breaking changes? |
@PoLaKoSz once v1 is merged then I think we can look at fixing this. It could be done using a custom json serialization plugin perhaps but something to look at after v1 |
In TMDb v3 the search/person endpoint response different from the search/movies so the response can not be
Task<MovieList>
.The text was updated successfully, but these errors were encountered: