/// <summary>
        /// Get the meeting info for this Indico agenda.
        /// </summary>
        /// <returns></returns>
        public async Task <IMeeting> GetMeeting()
        {
            // Load up the normalized data.

            var al      = new AgendaLoader(IndicoDataFetcher.Fetcher);
            var apiInfo = IndicoApiKeyAccess.GetKey(_info.AgendaSite);
            var agenda  = await al.GetNormalizedConferenceData(_info, apiInfo == null?null : apiInfo.ApiKey, apiInfo == null?null : apiInfo.SecretKey);

            // Clean it up
            CleanUpMeeting(agenda);

            return(new IndicoMeeting(agenda, _info.AsShortString()));
        }
Esempio n. 2
0
        /// <summary>
        /// Return a list of meetings for this agenda.
        /// </summary>
        public async Task <IEnumerable <IMeetingRefExtended> > GetMeetings(int goingBackDays)
        {
            try
            {
                var al       = new AgendaLoader(IndicoDataFetcher.Fetcher);
                var apiInfo  = IndicoApiKeyAccess.GetKey(aCategory.AgendaSite);
                var meetings = await al.GetCategory(aCategory, goingBackDays, apiInfo == null?null : apiInfo.ApiKey, apiInfo == null?null : apiInfo.SecretKey);

                return(meetings.Select(m => new IndicoMeetingExtendedRef(m)).Cast <IMeetingRefExtended>().ToArray());
            } catch (iCalDeserializationException e)
            {
                throw new InvalidOperationException(string.Format("Can't Indico category reply: {0}.", e.ParseText));
            }
        }