One Movie - Exploring The Movie Database Api
Tags: showdev, android, opensource
Published: 2018-04-17 01:00:22

---
title: One Movie - Exploring The Movie Database Api
published: true
description: One Movie it’s an Android app that helps you discover random movies based on a filter of what you’d like to watch.
tags: showdev, android, opensource
canonical_url: https://isscroberto.com/2017/12/26/one-movie/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/75v75lph4b4hwmts9gom.png
---

I don't know if I fit in the definition of <em>cinephile</em>, but I really enjoy watching movies and so does my wife, we've been going to the movies on a weekly basis for around 4 years and we watch a couple more at home in our free time.

<img class=" aligncenter" src="https://i.giphy.com/media/pUeXcg80cO8I8/giphy.webp" width="200" height="150" />

Because of this, the question: "What movie should we watch?" has become a too recurrent question for us so I did what any other software developer would do: I start coding.

I found this really cool api right away: <a href="https://api.themoviedb.org" target="_blank" rel="noopener">https://api.themoviedb.org</a>

<img class="  wp-image-91 aligncenter" src="https://isscroberto.files.wordpress.com/2017/12/movie_logo.png" alt="movie_logo" width="200" height="177" />

A public api to explore the movie db with plenty of cool features and tons of information about millions of movies. Awesome!

<img class=" aligncenter" src="https://i.giphy.com/media/d2Z9QYzA2aidiWn6/giphy.webp" width="250" height="140" />

I used the /discover endpoint, you can use it to discover movies sorted and filtered by many parameters like rating, votes, genres, etc. You can look at the specs <a href="https://developers.themoviedb.org/3/discover/movie-discover" target="_blank" rel="noopener">here</a>.

After a few hours exploring the api and a few days of coding on my free time I had <a href="https://play.google.com/store/apps/details?id=com.isscroberto.onemovie" target="_blank" rel="noopener">One Movie</a>, a very simple app that gives you random movies for exactly that moment when are finding a hard time deciding which movie to watch and you need an app that decide for you.

<a href="https://play.google.com/store/apps/details?id=com.isscroberto.onemovie" target="_blank" rel="noopener"><img class="  wp-image-92 aligncenter" src="https://isscroberto.files.wordpress.com/2017/12/logo_round.png" alt="logo_round" width="250" height="250" /></a>

So, this is what you get.

The app takes you directly to the main screen where you automatically get a random movie, you can see some basic information about it as well as hit <strong>refresh</strong> to get the next movie if you're not happy with the current one.

Then there is the filter screen where you can narrow your search and it has the following options:
<ul>
	<li>Popular</li>
</ul>
Popularity is a very important metric in IMDB, it takes many parameters in consideration, such as, the number of votes and views for the day, the number of users who favorited the movie and added it to their watchlists, the release date, the number of votes, among others. <a href="https://play.google.com/store/apps/details?id=com.isscroberto.onemovie" target="_blank" rel="noopener">One Movie</a> order the movies by popularity and take the top ones.
<ul>
	<li>In Theatres</li>
</ul>
Very simple. It filters movies with a release date less than 1 month old and with theatre release.
<ul>
	<li>Year</li>
</ul>
It filters movies with a release year equal or greater than the specified year.
<ul>
	<li>Original Language</li>
</ul>
It filters movies by the selected language.
<ul>
	<li>Genre</li>
</ul>
It filters movies limiting the search to movies that are within the selected genre. Feel like watching comedy? Horror? Romantic?
<ul>
	<li>Vote</li>
</ul>
It filters movies with a vote average equal or greater than the specified value.

And, of course, <a href="https://play.google.com/store/apps/details?id=com.isscroberto.onemovie" target="_blank" rel="noopener">One Movie</a> has a simple about screen. That's it.

<img class="aligncenter  wp-image-95" src="https://isscroberto.files.wordpress.com/2017/12/screenshot_20171226-222728.png?w=586" alt="Screenshot_20171226-222728.png" width="280" height="498" />

Take a look at it :) Leave a comment on how can I improve it and a rating on Play Store would be awesome.
<p class="graf graf--p">Check the <a class="markup--anchor markup--p-anchor" href="https://github.com/robertoissc/OneMovie-Android" target="_blank" rel="noopener" data-href="https://github.com/robertoissc/OneMovie-Android">repo</a> and feel free to contribute.</p>