protected override CustomListObjectElementCollection GetItemsOverride(CustomListData data)
        {
            CheckProperties(data, out string Subdomain, out string Email, out string Password);
            List <YaroomsMeeting> mymeetings = YaroomsHelper.GetAllMeetings(Subdomain, Email, Password);

            var items = new CustomListObjectElementCollection();

            foreach (var meeting in mymeetings)
            {
                items.Add(new CustomListObjectElement {
                    { "Id", meeting.id },
                    { "Date", meeting.date },
                    { "StartTime", meeting.start },
                    { "EndTime", meeting.end },
                    { "Location", meeting.location },
                    { "Room", meeting.room },
                    { "Name", meeting.name },
                    { "Description", meeting.description },
                });
            }

            this.Log?.Info(string.Format("Ingres extension fetched {0} rows.", items.Count));

            return(items);
        }
Exemplo n.º 2
0
        public static List <YaroomsMeeting> GetAllMeetings(string subdomain, string email, string password)
        {
            string token = YaroomsHelper.GetToken(subdomain, email, password);

            YaroomsHelper.GetMeetingRooms(token);
            Dictionary <string, string> locations = YaroomsHelper.GetLocations(token);
            List <YaroomsMeeting>       meetings  = new List <YaroomsMeeting>();

            foreach (var location in locations)
            {
                YaroomsHelper.AddMeetingsFromLocationToList(token, location.Key, meetings);
            }

            return(meetings);
        }