Exemple #1
0
        public static async Task <List <InternalEpisode> > PreviousEpisodesSeen(InternalPreviousEpisodeSeenRequest model)
        {
            var marked =
                await new WebClientManager().PreviousEpisodesSeen <List <InternalEpisode> >(
                    $"http://localhost:5001/series/check/seen/previous", model);

            return(marked);
        }
Exemple #2
0
        public async Task <List <InternalEpisode> > PreviousEpisodesSeen <T>(string url,
                                                                             InternalPreviousEpisodeSeenRequest model)
        {
            var c           = new HttpClient();
            var json        = JsonConvert.SerializeObject(model);
            var httpContent = new StringContent(json, Encoding.UTF8, "application/json");
            var request     = await c.PostAsync(new Uri(url), httpContent);

            var response = await request.Content.ReadAsStringAsync();

            var res = JsonConvert.DeserializeObject <Result <List <InternalEpisode> > >(response);

            return(res.Data);
        }