Inspired by Six Degrees of Kevin Bacon. Given two actors, the app will tell you the relationship path between them. For example, when giving Johnny Depp and Tom Cruise, you may get
- Johnny Depp acted in Fear and Loathing in Las Vegas with Cameron Diaz
- Cameron Diaz acted in Vanilla Sky with Tom Cruise
The data comes from the The Movie Database's API so the results will only be as good as their data set. Additionally, the data is loaded into a database at the point that a user submits the form with the two actors. Because of that, I explicitly limit the number of requests to the API so that they aren't DOS'd on accident. Keep this in mind if the results aren't quite accurate or when you notice that loading the page takes a long time :)
This app was mostly developed so I could learn about the CosmosDB Graph API, NSubstitute, and ASP.Net Core.
This project requires an API key from The Movie Database.
- Register for TMDB and request API access.
- Find the version 3 API key in your account settings.
- Create an environment variable named TmdbV3ApiKey and set its value to your version 3 API key.
This project uses CosmosDB as the data store.
- Install and start the CosmosDB emulator by following these instructions.
- Open the solution in Visual Studio 2017. Your mileage may vary with other development environments (Rider, VSCode).
- Run the integration tests. This will create a database and a test collection if everything is working correctly.
- Run the website. This will create the database if it doesn't already exist and also the collection.
- Put in Tom Cruise and Cameron Diaz. You'll see that they worked together on Vanilla Sky.
Pull requests are welcome, if unlikely :-).