Exemplo n.º 1
0
        public bool AddShow(int id)
        {
            if (ShowsId.Any(s => s == id))
            {
                return(false);
            }
            ShowsId.Add(id);
            var show = GetQueryResult <Show>($"http://api.tvmaze.com/shows/{id}");

            show.Episodes = GetQueryResult <List <Episode> >($"http://api.tvmaze.com/shows/{id}/episodes");
            Shows.Add(show);
            SaveData();
            ChangedShow?.Invoke();
            return(true);
        }