Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Renaming the Campaign Manager Hook for consistency with other GMP hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
efolgar committed Oct 28, 2019
1 parent c8dd166 commit 8af2977
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions orchestra/google/marketing_platform/hooks/campaign_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from googleapiclient.discovery import build


class GoogleCampaignManagerReportingHook(GoogleCloudBaseHook):
class GoogleCampaignManagerHook(GoogleCloudBaseHook):
"""Hook for connecting to the Doubleclick Campaign Manager DFA Reporting API.
"""

Expand All @@ -41,7 +41,7 @@ def __init__(self,
api_name: The name of the DCM API.
api_version: The version of the DCM API.
"""
super(GoogleCampaignManagerReportingHook, self).__init__(
super(GoogleCampaignManagerHook, self).__init__(
gcp_conn_id=gcp_conn_id,
delegate_to=delegate_to)
self.api_name = api_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

from airflow.contrib.hooks.gcs_hook import GoogleCloudStorageHook
from orchestra.google.marketing_platform.hooks.campaign_manager import (
GoogleCampaignManagerReportingHook
GoogleCampaignManagerHook
)
from orchestra.google.marketing_platform.operators.marketing_platform import (
GoogleMarketingPlatformBaseOperator
Expand Down Expand Up @@ -87,7 +87,7 @@ def _run_report(self, profile_id, report_id):

def execute(self, context):
if self.hook is None:
self.hook = GoogleCampaignManagerReportingHook(
self.hook = GoogleCampaignManagerHook(
gcp_conn_id=self.gcp_conn_id,
delegate_to=self.delegate_to)

Expand Down Expand Up @@ -137,7 +137,7 @@ def __init__(self,

def execute(self, context):
if self.hook is None:
self.hook = GoogleCampaignManagerReportingHook(
self.hook = GoogleCampaignManagerHook(
gcp_conn_id=self.gcp_conn_id,
delegate_to=self.delegate_to)

Expand Down Expand Up @@ -242,7 +242,7 @@ def execute(self, context):
google_cloud_storage_conn_id=self.gcp_conn_id,
delegate_to=self.delegate_to)
if self.cm_hook is None:
self.cm_hook = GoogleCampaignManagerReportingHook(
self.cm_hook = GoogleCampaignManagerHook(
gcp_conn_id=self.gcp_conn_id,
delegate_to=self.delegate_to)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from airflow.sensors.base_sensor_operator import BaseSensorOperator
from orchestra.google.marketing_platform.hooks.campaign_manager import (
GoogleCampaignManagerReportingHook
GoogleCampaignManagerHook
)

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -72,7 +72,7 @@ def __init__(self,

def poke(self, context):
if self.hook is None:
self.hook = GoogleCampaignManagerReportingHook(
self.hook = GoogleCampaignManagerHook(
gcp_conn_id=self.gcp_conn_id,
delegate_to=self.delegate_to)
logger.info(self.gcp_conn_id)
Expand Down

0 comments on commit 8af2977

Please sign in to comment.