public async Task LoadMovieLookups()
{
var movieRatingRequestMessage = CreateRequestMessage(new Uri($"{BaseAddress.ToString()}MovieLookups/Ratings"), HttpMethod.Get);
var movieRatingResponse = await MakeRequest<List<MovieRating>>(movieRatingRequestMessage.RequestMessage, movieRatingRequestMessage.TokenSource.Token);
if (movieRatingResponse.Success)
{
MovieRatingLookupList = new ObservableCollection<MovieRating>(movieRatingResponse.Result);
}
var movieRegionRequestMessage = CreateRequestMessage(new Uri($"{BaseAddress.ToString()}MovieLookups/Regions"), HttpMethod.Get);
var movieRegionResponse = await MakeRequest<List<MovieRegion>>(movieRegionRequestMessage.RequestMessage, movieRegionRequestMessage.TokenSource.Token);
if (movieRegionResponse.Success)
{
MovieRegionLookupList = new ObservableCollection<MovieRegion>(movieRegionResponse.Result);
}
} |