Omertron / api-themoviedb

API for TheMovieDb.org website
GNU General Public License v3.0
154 stars 65 forks source link

API is not getting all info about a movie (null) #10

Closed livingsilver94 closed 11 years ago

livingsilver94 commented 11 years ago

Hello! despite there are the information I'm looking for on themobiedb.org, that API is getting null values. This is the movie page http://www.themoviedb.org/movie/668-on-her-majesty-s-secret-service?language=it and that's the JSON downloaded: MovieDb[backdropPath=/l2axRuw41k2qZMe9YktDG1jKE3s.jpg,id=668,originalTitle=On Her Majesty's Secret Service,popularity=3.3239927,posterPath=/dga3zRbnXiqMNPvUnQNIdHsjtFf.jpg,releaseDate=1969-12-18,title=007 - Al servizio segreto di Sua Maestà,adult=false,belongsToCollection=<null>,budget=0,genres=<null>,homepage=<null>,imdbID=<null>,overview=<null>,productionCompanies=<null>,productionCountries=<null>,revenue=0,runtime=0,spokenLanguages=<null>,tagline=<null>,userRating=0.0,voteAverage=6.2,voteCount=87,status=<null>,alternativeTitles=<null>,casts=<null>,images=<null>,keywords=<null>,releases=<null>,trailers=<null>,translations=<null>,similarMovies=<null>,reviews=<null>,lists=<null>]

I tried both maven and github sources. Am I noob? (I am :P)

EDIT: I got that string by means of System.out.println(MovieDb movie)

Omertron commented 11 years ago

What method did you call to get the response?

Omertron commented 11 years ago

Ok,I think you are misunderstanding how the API works. You don't get all the information in one go, you have to make several calls to get the information that you require.

If the method you are calling has an "appendToMethod" you can add keywords to get the extra information, e.g.

MovieDb m = tmdb.getMovieInfo(668, "it");

will get the basic information, where as

MovieDb m = tmdb.getMovieInfo(668, "it", "casts,images");

will get the basic information plus cast and images

livingsilver94 commented 11 years ago

Clear and simple! I didn't know that proceeding because I was just using tmdb.searchMovie(). Thank you!