Skip to content

Commit

Permalink
use private convention on intermediate streams
Browse files Browse the repository at this point in the history
  • Loading branch information
pnadolny13 committed Oct 24, 2024
1 parent d784637 commit 5c2d3a4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tap_linkedin_ads/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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": {}},
)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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": {}},
)
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 5c2d3a4

Please sign in to comment.