Ron Smits - 2013-01-06

Getting started

update

I released 0.1.0 and placed it in a repository here on sourceforge. Add this repo to your pom:

<repository>
  <id>omdbapi4j repo</id>
  <url>http://omdbapi4j.sf.net/maven2</url>
</repository>

and the dependency:

<dependency>
  <groupId>com.omdbapi</groupId>
  <artifactId>omdbapi</artifactId>
  <version>0.1.0</version>
</dependency>

Usage

Pretty simple really, add the jar to your project then call it as follows:

List<SearchResult> results = new Omdb().search("Star wars");

The list will contain at most 5 results containing "Star wars" in the title.
SearchResult contains only a small subset of a complete answer. With it you can receive a full answer like this:

Movie movie = new Omdb.getById(searchresult.getImdbID());

You can search for a single movie like this:

Movie movie = new Omdb.getOneMovie("the brotherhood");

Searches can be narrowed down to a year:

List<SearchResult> results = new Omdb().year(1977).search("Star wars");

Check the junit tests!

 

Last edit: Ron Smits 2013-01-08