Package com.amilesend.omdb.client
Class OMDb
java.lang.Object
com.amilesend.omdb.client.OMDb
The Open Movie Database client.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newOMDb
with the provided API key.Creates a nweOMDb
with the provided API key and user agent.OMDb
(String apiKey, String userAgent, OmdbConnection connection) Creates a newOMDb
with the provided connection and API key. -
Method Summary
Modifier and TypeMethodDescriptiongetEpisode
(@NonNull GetEpisodeBasedRequest request) Gets a TV episode for a request by either its series title or IMDB identifier.getMovie
(@NonNull GetMovieBasedRequest request) Gets a movie for a request by either its title or IMDB identifier.getSeason
(@NonNull GetSeasonBasedRequest request) Gets a TV season for a request by either its title or IMDB identifier.getSeries
(@NonNull GetSeriesBasedRequest request) Gets a TV series for a request by either its title or IMDB identifier.search
(@NonNull SearchMovieRequest request) Searches for movies.search
(@NonNull SearchSeriesRequest request) Searches for TV series.
-
Field Details
-
USER_AGENT
- See Also:
-
API_URL
- See Also:
-
-
Constructor Details
-
OMDb
Creates a newOMDb
with the provided API key.- Parameters:
apiKey
- the API key
-
OMDb
Creates a nweOMDb
with the provided API key and user agent.- Parameters:
apiKey
- the API keyuserAgent
- the user agent
-
OMDb
Creates a newOMDb
with the provided connection and API key.- Parameters:
apiKey
- the API keyuserAgent
- the user agentconnection
- the underlying connection
-
-
Method Details
-
getMovie
Gets a movie for a request by either its title or IMDB identifier.- Parameters:
request
- the request- Returns:
- the movie
- See Also:
-
getSeries
Gets a TV series for a request by either its title or IMDB identifier.- Parameters:
request
- the request- Returns:
- the series
- See Also:
-
getSeason
Gets a TV season for a request by either its title or IMDB identifier.- Parameters:
request
- the request- Returns:
- the season
- See Also:
-
getEpisode
Gets a TV episode for a request by either its series title or IMDB identifier.- Parameters:
request
- the request- Returns:
- the episode
- See Also:
-
search
Searches for movies.- Parameters:
request
- the request- Returns:
- the response containing the list of movies
-
search
Searches for TV series.- Parameters:
request
- the request- Returns:
- the response containing the list of TV series.
-