예제 #1
0
        public async Task <DbOrgMovie> GetMovie(long movieId)
        {
            HttpResponseMessage response = await MovieDbHttpClient.GetAsync($"movie/{movieId}?{ApiKeyParam}&append_to_response=releases");

            string json = await response.Content.ReadAsStringAsync();

            DbOrgMovie movie = DbOrgMovie.FromJson(json);

            return(movie);
        }
예제 #2
0
        public async Task <DbOrgMovieResults> GetMovieResults(string queryString)
        {
            string escapedQuery          = Uri.EscapeUriString(queryString);
            HttpResponseMessage response = await MovieDbHttpClient.GetAsync($"search/movie?{ApiKeyParam}&query={escapedQuery}");

            string json = await response.Content.ReadAsStringAsync();

            DbOrgMovieResults movieResults = DbOrgMovieResults.FromJson(json);

            return(movieResults);
        }