Beispiel #1
0
        public async Task <Movie> GetMovieAsync(string id)
        {
            var movie =
                await JsonRestApi.GetAsync <Movie>($"{BaseUriString}movies/{id}");

            return(movie);
        }
Beispiel #2
0
        public async Task <IList <Movie> > GetMoviesAsync()
        {
            var movies =
                await JsonRestApi.GetAsync <List <Movie> >($"{BaseUriString}movies");

            return(movies);
        }
Beispiel #3
0
 public async Task RemoveMovieAsync(string id)
 {
     await JsonRestApi.DeleteAsync($"{BaseUriString}movies/{id}");
 }
Beispiel #4
0
 public async Task InsertMovieAsync(Movie movie, string id)
 {
     await JsonRestApi.PutAsync <Movie>($"{BaseUriString}movies/{id}", movie);
 }
Beispiel #5
0
 public async Task UpdateMoviesAsync(List <Movie> movies)
 {
     await JsonRestApi.PostAsync <List <Movie> >($"{BaseUriString}movies", movies);
 }