diff --git a/city_scrapers/mixins/mc.py b/city_scrapers/mixins/mc.py new file mode 100644 index 0000000..cc56411 --- /dev/null +++ b/city_scrapers/mixins/mc.py @@ -0,0 +1,144 @@ +from datetime import datetime + +from city_scrapers_core.constants import ( + BOARD, + CITY_COUNCIL, + COMMISSION, + COMMITTEE, + NOT_CLASSIFIED, +) +from city_scrapers_core.items import Meeting +from city_scrapers_core.spiders import CityScrapersSpider +from dateutil.relativedelta import relativedelta +from scrapy import Request + + +class MCMixinMeta(type): + """ + Metaclass that enforces the implementation of required static + variables in child classes. + """ + + def __init__(cls, name, bases, dct): + required_static_vars = ["agency", "name", "category_id"] + missing_vars = [var for var in required_static_vars if var not in dct] + + if missing_vars: + missing_vars_str = ", ".join(missing_vars) + raise NotImplementedError( + f"{name} must define the following static variable(s): {missing_vars_str}." # noqa + ) + super().__init__(name, bases, dct) + + +class MCMixin(CityScrapersSpider, metaclass=MCMixinMeta): + """ + Spider mixin for City of Mandan in Mandan, ND. This mixin + is intended to be used as a base class for spiders that scrape meeting + data from the city's website. + """ + + base_url = "https://mandannd.api.civicclerk.com" + timezone = "America/Chicago" + name = None + agency = None + category_id = None + + def start_requests(self): + """ + sdfsdfsdf + """ + # Calculate dates for one month prior and one year ahead + today = datetime.today() + one_month_prior = today - relativedelta(months=1) + one_year_ahead = today + relativedelta(months=6) + + # Format dates like "2024-03-01T00:00:00.000Z" + meeting_date_from = one_month_prior.strftime("%Y-%m-%dT%H:00:00Z") + meeting_date_to = one_year_ahead.strftime("%Y-%m-%dT%H:00:00Z") + + # build the URL + url = f"{self.base_url}/v1/Events?$filter=categoryId+in+({self.category_id})+and+startDateTime+ge+{meeting_date_from}+and+startDateTime+le+{meeting_date_to}&$orderby=startDateTime" # noqa + + yield Request(url, callback=self.parse) + + def parse(self, response): + """ + Parse a list of meetings from the response. + """ + print("donkey", response) + items = response.json() + if not items or len(items) == 0 or "value" not in items: + self.logger.warning("No meetings found") + return + for item in items["value"]: + meeting = Meeting( + title=item["eventName"], + description=item["eventDescription"], + classification=self._parse_classification(item["categoryName"]), + start=self._parse_start(item["startDateTime"]), + end=None, + all_day=False, + time_notes="", + location=self._parse_location(item["eventLocation"]), + links=self._parse_links(item), + source=response.url, + ) + meeting["status"] = self._get_status(meeting) + meeting["id"] = self._get_id(meeting) + yield meeting + + def _parse_classification(self, name): + """ + Parse or generate classification from allowed options. + """ + if "city council" in name.lower(): + return CITY_COUNCIL + if "board" in name.lower(): + return BOARD + if "commission" in name.lower(): + return COMMISSION + if "committee" in name.lower(): + return COMMITTEE + return NOT_CLASSIFIED + + def _parse_start(self, start): + """ + Parse the start date and time. + """ + return datetime.strptime(start, "%Y-%m-%dT%H:%M:%SZ") + + def _parse_location(self, location): + """ + Parse or generate location. + """ + if not location: + return { + "name": "", + "address": "", + } + # build location from address1, city, state, zipCode + address = location["address1"] + address_fields = ["address2", "city", "state", "zipCode"] + for field in address_fields: + if location[field]: + address += f", {location[field].strip()}" + return { + "name": "", + "address": address, + } + + def _parse_links(self, item): + """ + Parse published files into links. + """ + links = [] + if "publishedFiles" in item and len(item["publishedFiles"]) > 0: + for file in item["publishedFiles"]: + links.append( + { + "title": file["name"], + "href": f"https://mandannd.api.civicclerk.com/v1/Meetings/GetMeetingFileStream(fileId={file['fileId']},plainText=false)", # noqa + } + ) + return links diff --git a/city_scrapers/spiders/bisnd_mc.py b/city_scrapers/spiders/bisnd_mc.py new file mode 100644 index 0000000..0e0f8cc --- /dev/null +++ b/city_scrapers/spiders/bisnd_mc.py @@ -0,0 +1,139 @@ +from city_scrapers_core.spiders import CityScrapersSpider + +from city_scrapers.mixins.mc import MCMixin + +spider_configs = [ + { + "agency": "City of Mandan - General", + "category_id": 24, + "name": "bisnd_mc_g", + "class_name": "BisndMCGSpider", + }, + { + "agency": "City of Mandan - City Commission", + "category_id": 26, + "name": "bisnd_mc_cc", + "class_name": "BisndMCCCSpider", + }, + { + "agency": "City of Mandan - Airport Authority", + "category_id": 27, + "name": "bisnd_mc_aa", + "class_name": "BisndMCAASpider", + }, + { + "agency": "City of Mandan - Architectural Review Commission", + "category_id": 28, + "name": "bisnd_mc_arc", + "class_name": "BisndMCARCSpider", + }, + { + "agency": "City of Mandan - Civil Service Commission", + "category_id": 29, + "name": "bisnd_mc_csc", + "class_name": "BisndMCCSCSpider", + }, + { + "agency": "City of Mandan - Code Enforcement Appeals Board", + "category_id": 30, + "name": "bisnd_mc_ceab", + "class_name": "BisndMCCEABSpider", + }, + { + "agency": "City of Mandan - Community Beautification Committee", + "category_id": 31, + "name": "bisnd_mc_cbc", + "class_name": "BisndMCCBCSpider", + }, + { + "agency": "City of Mandan - Board of Equalization", + "category_id": 32, + "name": "bisnd_mc_boe", + "class_name": "BisndMCBOESpider", + }, + { + "agency": "City of Mandan - Growth Fund Committee", + "category_id": 33, + "name": "bisnd_mc_gfc", + "class_name": "BisndMCGFCSpider", + }, + { + "agency": "City of Mandan - Library Board of Trustees", + "category_id": 34, + "name": "bisnd_mc_lbot", + "class_name": "BisndMCLBOTSpider", + }, + { + "agency": "City of Mandan - Parking Authority", + "category_id": 35, + "name": "bisnd_mc_pa", + "class_name": "BisndMCPASpider", + }, + { + "agency": "City of Mandan - Planning and Zoning Commission", + "category_id": 36, + "name": "bisnd_mc_pazc", + "class_name": "BisndMCPAZCSpider", + }, + { + "agency": "City of Mandan - Remediation Trust", + "category_id": 37, + "name": "bisnd_mc_rt", + "class_name": "BisndMCRTSpider", + }, + { + "agency": "City of Mandan - Renaissance Zone Committee", + "category_id": 38, + "name": "bisnd_mc_rzc", + "class_name": "BisndMCRZCSpider", + }, + { + "agency": "City of Mandan - Special Assessment Committee", + "category_id": 39, + "name": "bisnd_mc_sac", + "class_name": "BisndMCSACSpider", + }, + { + "agency": "City of Mandan - Tree Board", + "category_id": 40, + "name": "bisnd_mc_tb", + "class_name": "BisndMCTBSpider", + }, + { + "agency": "City of Mandan - Visitors Committee", + "category_id": 41, + "name": "bisnd_mc_vc", + "class_name": "BisndMCVCSpider", + }, + { + "agency": "City of Mandan - Weed Board", + "category_id": 42, + "name": "bisnd_mc_wb", + "class_name": "BisndMCWBSpider", + }, +] + + +def create_spiders(): + """ + Dynamically create spider classes using the spider_configs list + and then register them in the global namespace. This approach + is the equivalent of declaring each spider class in the same + file but it is a little more concise. + """ + for config in spider_configs: + class_name = config.pop("class_name") + # We make sure that the class_name is not already in the global namespace + # Because some scrapy CLI commands like `scrapy list` will inadvertently + # declare the spider class more than once otherwise + if class_name not in globals(): + spider_class = type( + class_name, + (MCMixin, CityScrapersSpider), # Base classes + {**config}, # Attributes including name, agency, committee_id + ) + # Register the class in the global namespace using its class_name + globals()[class_name] = spider_class + + +create_spiders() diff --git a/tests/files/bisnd_mc_cc.json b/tests/files/bisnd_mc_cc.json new file mode 100644 index 0000000..0f46c1c --- /dev/null +++ b/tests/files/bisnd_mc_cc.json @@ -0,0 +1,1933 @@ +{ + "@odata.context": "https://mandannd.api.civicclerk.com/v1/$metadata#Events", + "value": [ + { + "id": 15, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 24, + "eventDate": "2024-02-20T17:00:00Z", + "startDateTime": "2024-02-20T17:00:00Z", + "createdOn": "2023-11-28T14:14:38.203Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 33, + "agendaName": "City Commission Agenda", + "cutOffDateTime": "2024-02-20T13:25:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "https://dakotamediaaccess.net/CablecastPublicSite/show/10428?site=2", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": true, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": 0, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 15, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [ + { + "fileId": 96, + "publishTo": null, + "type": "Minutes", + "publishOn": "2024-03-06T15:03:38.99Z", + "publishBy": null, + "name": "February 20, 2024 City Commission Meeting Minutes", + "url": "stream/MANDANND/e213b762-2fcc-4e58-9cd0-b24474492dc2.pdf", + "sort": 3, + "fileType": 4, + "streamUrl": null + } + ] + }, + { + "id": 4, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 23, + "eventDate": "2024-03-05T17:30:00Z", + "startDateTime": "2024-03-05T17:30:00Z", + "createdOn": "2023-11-28T14:13:58.76Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 38, + "agendaName": "City Commission", + "cutOffDateTime": "2024-03-05T12:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "2024-03-07T16:59:25.917Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "https://reflect-dakotamediaaccess.cablecast.tv/store-4/10429-en-US-v3/vod.mp4", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": true, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": 0, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "Agenda Posted on March 5, 2024 2:23 PM", + "eventLocation": { + "id": 4, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [ + { + "fileId": 94, + "publishTo": null, + "type": "Agenda", + "publishOn": "2024-03-05T14:23:27.77Z", + "publishBy": null, + "name": "March 5, 2024 City Commission Agenda", + "url": "stream/MANDANND/d14c22c0-9910-413c-9b34-f1f2e6d9b0b5.pdf", + "sort": 1, + "fileType": 1, + "streamUrl": null + }, + { + "fileId": 95, + "publishTo": null, + "type": "Agenda Packet", + "publishOn": "2024-03-05T14:23:27.77Z", + "publishBy": null, + "name": "March 5, 2024 City Commision Agenda Packet", + "url": "stream/MANDANND/ad7a6e2a-38ad-4b22-810d-33e23040689d.pdf", + "sort": 2, + "fileType": 2, + "streamUrl": null + } + ] + }, + { + "id": 16, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 24, + "eventDate": "2024-03-19T17:30:00Z", + "startDateTime": "2024-03-19T17:30:00Z", + "createdOn": "2023-11-28T14:14:38.217Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 39, + "agendaName": "City Commission", + "cutOffDateTime": "2024-03-13T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 16, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 5, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 23, + "eventDate": "2024-04-02T17:30:00Z", + "startDateTime": "2024-04-02T17:30:00Z", + "createdOn": "2023-11-28T14:13:58.777Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 47, + "agendaName": "City Commission", + "cutOffDateTime": "2024-03-26T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 5, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 17, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 24, + "eventDate": "2024-04-16T17:30:00Z", + "startDateTime": "2024-04-16T17:30:00Z", + "createdOn": "2023-11-28T14:14:38.227Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 40, + "agendaName": "City Commission", + "cutOffDateTime": "2024-04-09T00:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 17, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 6, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 23, + "eventDate": "2024-05-07T17:30:00Z", + "startDateTime": "2024-05-07T17:30:00Z", + "createdOn": "2023-11-28T14:13:58.793Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 42, + "agendaName": "City Commission", + "cutOffDateTime": "2024-05-01T00:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 6, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 18, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 24, + "eventDate": "2024-05-21T17:30:00Z", + "startDateTime": "2024-05-21T17:30:00Z", + "createdOn": "2023-11-28T14:14:38.24Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 0, + "agendaName": null, + "cutOffDateTime": "1900-01-01T00:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": false, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 18, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 149, + "eventName": "One Time Event", + "eventDescription": "", + "eventTemplateId": 17, + "eventDate": "2024-05-21T17:30:00Z", + "startDateTime": "2024-05-21T17:30:00Z", + "createdOn": "2024-02-13T16:24:51.467Z", + "createdByUserId": "c9b36fd1-02e3-44ab-8062-db62d88aec64", + "isPublished": "Published", + "agendaId": 41, + "agendaName": "City Commission", + "cutOffDateTime": "2024-04-09T00:00:00Z", + "categoryName": "City Commission", + "keywords": "", + "visibilityId": 1, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "One Time Event", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 149, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 89, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 23, + "eventDate": "2024-06-04T17:30:00Z", + "startDateTime": "2024-06-04T17:30:00Z", + "createdOn": "2024-02-02T12:38:02.737Z", + "createdByUserId": "9ac61f8c-c025-42c9-ab1d-425657985ce5", + "isPublished": "Published", + "agendaId": 43, + "agendaName": "City Commission", + "cutOffDateTime": "2024-05-29T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 89, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 19, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 24, + "eventDate": "2024-06-18T17:30:00Z", + "startDateTime": "2024-06-18T17:30:00Z", + "createdOn": "2023-11-28T14:14:38.253Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 44, + "agendaName": "City Commission", + "cutOffDateTime": "2024-06-12T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 19, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 8, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 23, + "eventDate": "2024-07-02T17:30:00Z", + "startDateTime": "2024-07-02T17:30:00Z", + "createdOn": "2023-11-28T14:13:58.823Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 48, + "agendaName": "City Commission", + "cutOffDateTime": "2024-06-26T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 8, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 20, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 24, + "eventDate": "2024-07-16T17:30:00Z", + "startDateTime": "2024-07-16T17:30:00Z", + "createdOn": "2023-11-28T14:14:38.273Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 49, + "agendaName": "City Commission", + "cutOffDateTime": "2024-07-10T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 20, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 91, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 23, + "eventDate": "2024-08-06T17:30:00Z", + "startDateTime": "2024-08-06T17:30:00Z", + "createdOn": "2024-02-02T12:38:02.78Z", + "createdByUserId": "9ac61f8c-c025-42c9-ab1d-425657985ce5", + "isPublished": "Published", + "agendaId": 50, + "agendaName": "City Commission", + "cutOffDateTime": "2024-07-31T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 91, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 21, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 24, + "eventDate": "2024-08-20T17:30:00Z", + "startDateTime": "2024-08-20T17:30:00Z", + "createdOn": "2023-11-28T14:14:38.287Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 51, + "agendaName": "City Commission", + "cutOffDateTime": "2024-08-14T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 21, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + }, + { + "id": 10, + "eventName": "City Commission Meeting", + "eventDescription": "", + "eventTemplateId": 23, + "eventDate": "2024-09-03T17:00:00Z", + "startDateTime": "2024-09-03T17:00:00Z", + "createdOn": "2023-11-28T14:13:58.853Z", + "createdByUserId": "e46ec7bb-913e-4a75-9d73-96411635bebd", + "isPublished": "Published", + "agendaId": 52, + "agendaName": "City Commission", + "cutOffDateTime": "2024-08-28T18:00:00Z", + "categoryName": "City Commission", + "keywords": null, + "visibilityId": 2, + "showInUpcomingEvents": false, + "isOnDemandEvent": true, + "isLiveEvent": false, + "automaticallyStart": false, + "durationHrs": 0, + "durationMin": 0, + "mediaSourcePath": "", + "mediaStreamPath": "", + "mediaOrigFileName": "", + "publishStart": "1900-01-01T00:00:00Z", + "mediaTypeId": 1, + "liveStartTime": "1900-01-01T00:00:00Z", + "liveEndTime": "1900-01-01T00:00:00Z", + "liveIsCurrentlyStreaming": false, + "livePublishingPointId": -1, + "automaticallyStop": false, + "pauseMsgId": -1, + "streamingStatus": 0, + "youtubeVideoId": "", + "youtubeVideoThumbnailPath": "", + "youtubeVideoUploaded": 0, + "youtubeVideoProcessing": 0, + "mobileMediaSourcePath": "", + "mobileMediaStreamPath": "", + "mobileMediaOrigFileName": "", + "externalMediaUrl": "", + "mediaSourcePathMp4": "", + "mediaOrigFileNameMp4": "", + "mediaAwsKeyName": "", + "bookmarksAdded": 0, + "displayMessage": "", + "mediaUploadedBy": "00000000-0000-0000-0000-000000000000", + "mediaUploadedOn": "1900-01-01T00:00:00Z", + "mediaFileSize": 0, + "mediaTotalPlay": 0, + "closedCaptionFileName": "", + "closedCaptionFileType": "", + "closedCaptionUploadedBy": "00000000-0000-0000-0000-000000000000", + "closedCaptionUploadedOn": "1900-01-01T00:00:00Z", + "closedCaptionSourcePath": "", + "closedCaptionBlobPath": "", + "eventAutoStartEndTime": "1900-01-01T00:00:00Z", + "showPauseMessage": false, + "pauseMessage": "", + "closedCaptionServiceType": 0, + "closedCaptionStatus": "", + "closedCaptionOrderId": "", + "closedCaptionSeconds": 0, + "closedCaptionCost": 0.0, + "startEventAutomatically": false, + "actualStartTime": "1900-01-01T00:00:00Z", + "meetingEndTime": "1900-01-01T00:00:00Z", + "categoryId": 26, + "eventCategoryId": 26, + "eventCategoryName": "City Commission", + "eventTemplateName": "City Commission Meeting", + "hasAgenda": true, + "hasMedia": false, + "isLive": false, + "meetingIn": 0, + "isDeleted": false, + "finalDeletedDate": null, + "canAccessEventTemplate": false, + "mediaUploadedByName": " ", + "jwPlayerCode": null, + "closedCaptionUploadedByName": " ", + "streamId": -1, + "zoomMeetingId": null, + "eventNotice": "", + "showEventNoticePreview": false, + "cpMediaOnly": false, + "defaultPublicPortalPage": 0, + "updateEvent": false, + "meetingTypeId": 0, + "meetingTypeName": null, + "organizationId": null, + "publishedAgendaTimeStamp": "", + "eventLocation": { + "id": 10, + "eventId": 0, + "address1": null, + "address2": null, + "city": null, + "state": null, + "zipCode": null + }, + "agendaFile": { + "agendaId": 0, + "fileName": null, + "dateUploaded": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "minutesFile": { + "minutesId": 0, + "eventId": 0, + "fileName": null, + "createdOn": "0001-01-01T00:00:00Z", + "createdBy": " " + }, + "eventSocialMediaModel": { + "id": 0, + "eventId": 0, + "notifyTwitterWhenLive": false, + "tweetText": null, + "sendToFacebookLive": false, + "facebookLiveEmbedCode": null, + "isSocialMediaActive": false + }, + "publishedFiles": [] + } + ] +} diff --git a/tests/test_bisnd_mc_cc.py b/tests/test_bisnd_mc_cc.py new file mode 100644 index 0000000..0364673 --- /dev/null +++ b/tests/test_bisnd_mc_cc.py @@ -0,0 +1,78 @@ +from datetime import datetime +from os.path import dirname, join + +import pytest # noqa +from city_scrapers_core.constants import COMMISSION, PASSED +from city_scrapers_core.utils import file_response +from freezegun import freeze_time + +from city_scrapers.spiders.bisnd_mc import BisndMCCCSpider + +test_response = file_response( + join(dirname(__file__), "files", "bisnd_mc_cc.json"), + url="https://mandannd.api.civicclerk.com/v1/Events?$filter=categoryId+in+(26)+and+startDateTime+ge+2024-02-12T10:00:00Z+and+startDateTime+le+2024-09-12T10:00:00Z&$orderby=startDateTime", # noqa +) +spider = BisndMCCCSpider() + +freezer = freeze_time("2024-03-12") # Adjust the date as needed +freezer.start() + +parsed_items = [item for item in spider.parse(test_response)] + +freezer.stop() + + +def test_title(): + assert parsed_items[0]["title"] == "City Commission Meeting" + + +def test_description(): + assert parsed_items[0]["description"] == "" + + +def test_start(): + assert parsed_items[0]["start"] == datetime(2024, 2, 20, 17, 0) + + +def test_end(): + assert parsed_items[0]["end"] is None + + +def test_time_notes(): + assert parsed_items[0]["time_notes"] == "" + + +def test_id(): + assert parsed_items[0]["id"] == "bisnd_mc_cc/202402201700/x/city_commission_meeting" + + +def test_status(): + assert parsed_items[0]["status"] == PASSED + + +def test_location(): + assert parsed_items[0]["location"] == {"name": "", "address": None} + + +def test_source(): + assert ( + parsed_items[0]["source"] + == "https://mandannd.api.civicclerk.com/v1/Events?$filter=categoryId+in+(26)+and+startDateTime+ge+2024-02-12T10:00:00Z+and+startDateTime+le+2024-09-12T10:00:00Z&$orderby=startDateTime" # noqa + ) + + +def test_links(): + assert parsed_items[0]["links"] == [ + { + "href": "https://mandannd.api.civicclerk.com/v1/Meetings/GetMeetingFileStream(fileId=96,plainText=false)", # noqa + "title": "February 20, 2024 City Commission Meeting Minutes", + } + ] + + +def test_classification(): + assert parsed_items[0]["classification"] == COMMISSION + + +def test_all_day(): + assert parsed_items[0]["all_day"] is False diff --git a/tests/test_bisnd_mc_mixin.py b/tests/test_bisnd_mc_mixin.py new file mode 100644 index 0000000..2b6bc78 --- /dev/null +++ b/tests/test_bisnd_mc_mixin.py @@ -0,0 +1,119 @@ +from datetime import datetime + +import pytest +from city_scrapers_core.constants import ( + BOARD, + CITY_COUNCIL, + COMMISSION, + COMMITTEE, + NOT_CLASSIFIED, +) + +from city_scrapers.mixins.mc import MCMixin + + +class TestMCMixin: + @pytest.fixture + def mixin(self): + # Setup a basic instance of the mixin + # Ensure the required static vars are set + class TestSpider(MCMixin): + name = "test_spider_mc" + agency = "test_agency" + category_id = 100 + + return TestSpider() + + def test_mixin_initialization_requires_vars(self): + # Testing that the mixin raises NotImplementedError if required + # static vars are not defined + with pytest.raises(NotImplementedError) as exc_info: + + class InvalidSpider(MCMixin): + pass # Missing required vars + + assert "must define the following static variable(s)" in str( + exc_info.value + ), "Mixin should raise NotImplementedError for missing required static variables." # noqa + + def test_start_requests_url_format(self, mixin): + # Test if the start_requests method builds the URL correctly + requests = list(mixin.start_requests()) + assert requests, "start_requests should yield at least one Request" + url = requests[0].url + assert mixin.base_url in url, "The base_url should be part of the request URL" + assert ( + str(mixin.category_id) in url + ), "The category_id should be part of the request URL" + assert "Events?$filter=categoryId+in+(" in url, "URL filter format is incorrect" + + def test_parse_classification(self, mixin): + # Test various classifications based on category name + assert mixin._parse_classification("City Council Meeting") == CITY_COUNCIL + assert mixin._parse_classification("Board Meeting") == BOARD + assert mixin._parse_classification("Commission Meeting") == COMMISSION + assert mixin._parse_classification("Committee Meeting") == COMMITTEE + assert mixin._parse_classification("Other Meeting") == NOT_CLASSIFIED + + def test_parse_start(self, mixin): + # Test the start date and time parsing + start = "2024-03-12T09:00:00Z" + parsed_start = mixin._parse_start(start) + assert isinstance( + parsed_start, datetime + ), "Parsed start should be a datetime object" + assert ( + parsed_start.year == 2024 + and parsed_start.month == 3 + and parsed_start.day == 12 + ), "Parsed date does not match expected values" + + def test_parse_location(self, mixin): + # Test location parsing with complete details + location = { + "address1": "123 Main St", + "address2": "Suite 100", + "city": "Mandan", + "state": "ND", + "zipCode": "58554", + } + parsed_location = mixin._parse_location(location) + assert ( + parsed_location["address"] == "123 Main St, Suite 100, Mandan, ND, 58554" + ), "Parsed address does not match expected format" + + # Test with minimal details + location_minimal = { + "address1": "123 Main St", + "address2": "", + "city": "", + "state": "", + "zipCode": "", + } + parsed_location_minimal = mixin._parse_location(location_minimal) + assert ( + parsed_location_minimal["address"] == "123 Main St" + ), "Parsed address should handle minimal details correctly" + + def test_parse_links(self, mixin): + # Test links parsing with some published files + item_with_files = { + "publishedFiles": [ + { + "name": "Agenda", + "fileId": "12345", + }, + { + "name": "Minutes", + "fileId": "67890", + }, + ] + } + parsed_links = mixin._parse_links(item_with_files) + assert len(parsed_links) == 2, "Should parse all published files into links" + assert ( + parsed_links[0]["title"] == "Agenda" + ), "First link title does not match expected value" + assert ( + "fileId=12345" in parsed_links[0]["href"] + ), "First link href does not contain correct fileId"