diff --git a/.gitignore b/.gitignore index 0501afc..6869105 100644 --- a/.gitignore +++ b/.gitignore @@ -396,3 +396,6 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml +# ======= +# MINE +APIKey.txt diff --git a/README.md b/README.md index 0a35fb1..798337a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ # test-alebro -Test per colloquio \ No newline at end of file +Test per colloquio + +## Istruzioni per l'esecuzione + +Dopo aver clonato il repository, crea un file APIKey.txt nella cartella radice del progetto e inserisci l'API Key di OMDb. + +Poi esegui il progetto con: +```bash +dotnet run +``` diff --git a/Services/OmdbService.cs b/Services/OmdbService.cs new file mode 100644 index 0000000..815304c --- /dev/null +++ b/Services/OmdbService.cs @@ -0,0 +1,24 @@ + + +class OmdbService +{ + private readonly string url; + + public OmdbService() + { + var apiKey = File.ReadAllText("APIKey.txt").Trim(); + apiKey = System.Net.WebUtility.UrlEncode(apiKey); + + url = "http://www.omdbapi.com/?apikey=" + apiKey + "&"; + } + + public async void FetchMovieDetail(string id) + { + // TODO + } + + public async void FetchMovies(string searchTitle) + { + // TODO + } +} \ No newline at end of file