From 5c2d3a46cbeab01c15a32760952554970faeed36 Mon Sep 17 00:00:00 2001 From: Pat Nadolny Date: Thu, 24 Oct 2024 16:26:37 -0400 Subject: [PATCH] use private convention on intermediate streams --- tap_linkedin_ads/streams.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tap_linkedin_ads/streams.py b/tap_linkedin_ads/streams.py index a4f0faa..dda390f 100644 --- a/tap_linkedin_ads/streams.py +++ b/tap_linkedin_ads/streams.py @@ -755,7 +755,7 @@ def post_process(self, row: dict, context: dict | None = None) -> dict | None: return super().post_process(row, context) -class AdAnalyticsByCampaignInit(LinkedInAdsStream): +class _AdAnalyticsByCampaignInit(LinkedInAdsStream): """https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#analytics-finder.""" name = "AdAnalyticsByCampaignInit" @@ -934,7 +934,7 @@ def post_process(self, row: dict, context: dict | None = None) -> dict | None: return super().post_process(row, context) -class AdAnalyticsByCampaignSecond(AdAnalyticsByCampaignInit): +class _AdAnalyticsByCampaignSecond(_AdAnalyticsByCampaignInit): name = "adanalyticsbycampaign_second" def get_unencoded_params(self, context: Context | None) -> dict: @@ -953,7 +953,7 @@ def get_unencoded_params(self, context: Context | None) -> dict: } -class AdAnalyticsByCampaignThird(AdAnalyticsByCampaignInit): +class _AdAnalyticsByCampaignThird(_AdAnalyticsByCampaignInit): name = "adanalyticsbycampaign_third" def get_unencoded_params(self, context: Context | None) -> dict: @@ -972,7 +972,9 @@ def get_unencoded_params(self, context: Context | None) -> dict: } -class AdAnalyticsByCampaignStream(AdAnalyticsByCampaignInit): +class AdAnalyticsByCampaignStream(_AdAnalyticsByCampaignInit): + """https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#analytics-finder.""" + name = "ad_analytics_by_campaign" def get_unencoded_params(self, context: Context | None) -> dict: @@ -1007,15 +1009,15 @@ def get_records(self, context: dict | None) -> t.Iterable[dict[str, t.Any]]: Returns: A dictionary of records given from adAnalytics streams """ - adanalyticsinit_stream = AdAnalyticsByCampaignInit( + adanalyticsinit_stream = _AdAnalyticsByCampaignInit( self._tap, schema={"properties": {}}, ) - adanalyticsecond_stream = AdAnalyticsByCampaignSecond( + adanalyticsecond_stream = _AdAnalyticsByCampaignSecond( self._tap, schema={"properties": {}}, ) - adanalyticsthird_stream = AdAnalyticsByCampaignThird( + adanalyticsthird_stream = _AdAnalyticsByCampaignThird( self._tap, schema={"properties": {}}, ) @@ -1044,9 +1046,7 @@ def merge_dicts(self, *dict_args: dict) -> dict: return result -class AdAnalyticsByCreativeInit(LinkedInAdsStream): - """https://docs.microsoft.com/en-us/linkedin/marketing/integrations/ads-reporting/ads-reporting#analytics-finder.""" - +class _AdAnalyticsByCreativeInit(LinkedInAdsStream): name = "AdAnalyticsByCreativeInit" path = "/adAnalytics" parent_stream_type = CreativesStream @@ -1231,7 +1231,7 @@ def post_process(self, row: dict, context: dict | None = None) -> dict | None: return super().post_process(row, context) -class AdAnalyticsByCreativeStream(AdAnalyticsByCreativeInit): +class AdAnalyticsByCreativeStream(_AdAnalyticsByCreativeInit): name = "ad_analytics_by_creative" def get_unencoded_params(self, context: Context | None) -> dict: @@ -1266,15 +1266,15 @@ def get_records(self, context: dict | None) -> t.Iterable[dict[str, t.Any]]: Returns: A dictionary of records given from adAnalytics streams """ - adanalyticsinit_stream = AdAnalyticsByCreativeInit( + adanalyticsinit_stream = _AdAnalyticsByCreativeInit( self._tap, schema={"properties": {}}, ) - adanalyticsecond_stream = AdAnalyticsByCreativeSecond( + adanalyticsecond_stream = _AdAnalyticsByCreativeSecond( self._tap, schema={"properties": {}}, ) - adanalyticsthird_stream = AdAnalyticsByCreativeThird( + adanalyticsthird_stream = _AdAnalyticsByCreativeThird( self._tap, schema={"properties": {}}, ) @@ -1303,7 +1303,7 @@ def merge_dicts(self, *dict_args: dict) -> dict: return result -class AdAnalyticsByCreativeSecond(AdAnalyticsByCreativeInit): +class _AdAnalyticsByCreativeSecond(_AdAnalyticsByCreativeInit): name = "adanalyticsbycreative_second" def get_unencoded_params(self, context: Context | None) -> dict: @@ -1322,7 +1322,7 @@ def get_unencoded_params(self, context: Context | None) -> dict: } -class AdAnalyticsByCreativeThird(AdAnalyticsByCreativeInit): +class _AdAnalyticsByCreativeThird(_AdAnalyticsByCreativeInit): name = "adanalyticsbycreative_third" def get_unencoded_params(self, context: Context | None) -> dict: