A couple of colleagues and I decided to join ODTUG’s APEX Gaming Competition. The first challenge was to come up with a great idea for an addictive game. We had some creative people sitting around the table and after some brainstorming we ended up with a simple yet interesting concept: a movie guessing game based on a movie database web API.
Now, when you read “movie database”, the first thing you probably think of is IMDb. It came as a surprise to me that they don’t publish an (official) API. IMDb only distributes plain text data files, and that’s not really what we were looking for. In our search for an alternative, we came across TMDb (https://www.themoviedb.org/). It perfectly fitted our needs: an extensive movie database, well documented and reliable.
Invoking the web services from PL/SQL also gave us the opportunity to play around with the new APEX_JSON package, which has been introduced in APEX 5.0. After getting familiar with the package, it was pretty easy to parse the TMDb JSON responses and collect all relevant movie information. Take a look at the MG_TMDB_API_PKG if you want some example code on how to use the APEX_JSON package.
Here are some useful links related to this blog post: