public class JavaOMDB extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
IMDB_ID_PATTERN
A regular expression matching valid IMDB IDs.
|
| Constructor and Description |
|---|
JavaOMDB()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONObject |
get(Map<String,String> params)
Queries the OMDB API with given query parameters.
|
JOMDBRequests |
getRequests()
Gets the corresponding
JOMDBRequests object. |
SearchResults |
search(String search)
Searches for titles with specified text.
|
SeasonResult |
seasonById(String imdbId,
String season)
Gets a season by title's IMDB ID and season number.
|
SeasonResult |
seasonByName(String title,
String season)
Gets a season by title name and season number.
|
TitleResult |
titleById(String imdbId)
Gets a title by its IMDB ID, with a short plot.
|
TitleResult |
titleById(String imdbId,
boolean fullPlot)
Gets a title by its IMDB ID, optionally with a full plot.
|
TitleResult |
titleByName(String title)
Gets a title by its name, with a short plot.
|
TitleResult |
titleByName(String title,
boolean fullPlot)
Gets a title by its name, optionally with a full plot.
|
public static final Pattern IMDB_ID_PATTERN
public JOMDBRequests getRequests()
JOMDBRequests object.public org.json.JSONObject get(Map<String,String> params) throws JOMDBException
params - The parameters.JOMDBException - when an error occurs while retrieving or parsing JSONpublic SearchResults search(String search)
search - The search text.public TitleResult titleByName(String title)
title - The title's name.public TitleResult titleByName(String title, boolean fullPlot)
title - The title's name.fullPlot - Whether or not to get the full plot.public TitleResult titleById(String imdbId)
imdbId - The title's IMDB ID.public TitleResult titleById(String imdbId, boolean fullPlot)
imdbId - The title's IMDB ID.fullPlot - Whether or not to get the full plot.public SeasonResult seasonByName(String title, String season)
title - The title name.season - The season number.public SeasonResult seasonById(String imdbId, String season)
imdbId - The title's IMDB ID.season - The season number.Copyright © 2017. All rights reserved.