public static string WriteCalendar(string username, string password)
        {
            ShowRSSCalendar.Login login = new ShowRSSCalendar.Login();

            var episodes = login.GetEpisodeNodes(username, password, ScheduleTypeEnum.upcoming);
            episodes.AddRange(login.GetEpisodeNodes(username, password, ScheduleTypeEnum.aired));

            iCalendar ical = new iCalendar();

            foreach (var item in episodes)
            {
                ExtractNode.Extract(item).CreateEventFromEpisode(ical);
                Event evt = new Event();
            }

            iCalendarSerializer serializer = new iCalendarSerializer();
            return (serializer.SerializeToString(ical));
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Login login = new Login();

            var showtimeline = login.GetEpisodeNodes("stufkan", "stufkan", ScheduleTypeEnum.upcoming);

            iCalendar ical = new iCalendar();

            foreach (var item in showtimeline)
            {
                ExtractNode.Extract(item).CreateEventFromEpisode(ical,33);
            }

            iCalendarSerializer serializer = new iCalendarSerializer();
            serializer.Serialize(ical, @"showRss.ics");

            Console.WriteLine("Done");
            Console.ReadKey();
        }
Esempio n. 3
0
        private void WriteCalendar(string username, string password, int offset)
        {
            ShowRSSCalendar.Login login = new ShowRSSCalendar.Login();

            var episodes = login.GetEpisodeNodes(username, password, ScheduleTypeEnum.upcoming);
            episodes.AddRange(login.GetEpisodeNodes(username, password, ScheduleTypeEnum.aired));

            iCalendar ical = new iCalendar();

            if (episodes != null)
                foreach (var item in episodes)
                {
                    ExtractNode.Extract(item).CreateEventFromEpisode(ical, offset);
                    Event evt = new Event();
                }

            iCalendarSerializer serializer = new iCalendarSerializer();
            Response.Write(serializer.SerializeToString(ical));
        }