Added version information method

This commit is contained in:
Omertron
2012-04-07 08:58:31 +00:00
parent 62832a8368
commit 62cc9679e4
@@ -99,6 +99,25 @@ public class TheMovieDb {
}
}
/**
* Output the API version information to the debug log
*/
public static void showVersion() {
String apiTitle = TheMovieDb.class.getPackage().getSpecificationTitle();
if (StringUtils.isNotBlank(apiTitle)) {
String apiVersion = TheMovieDb.class.getPackage().getSpecificationVersion();
String apiRevision = TheMovieDb.class.getPackage().getImplementationVersion();
StringBuilder sv = new StringBuilder();
sv.append(apiTitle).append(" ");
sv.append(apiVersion).append(" r");
sv.append(apiRevision);
LOGGER.debug(sv.toString());
} else {
LOGGER.debug("API-TheMovieDb version/revision information not available");
}
}
/**
* Get the API key that is to be used
*