pierrejeambrun commented on a change in pull request #21349:
URL: https://github.com/apache/airflow/pull/21349#discussion_r800222875
##########
File path: airflow/providers/zendesk/hooks/zendesk.py
##########
@@ -31,90 +32,91 @@ class ZendeskHook(BaseHook):
:param zendesk_conn_id: The Airflow connection used for Zendesk
credentials.
"""
- def __init__(self, zendesk_conn_id: str) -> None:
+ conn_name_attr = 'zendesk_conn_id'
+ default_conn_name = 'zendesk_default'
+ conn_type = 'zendesk'
+ hook_name = 'Zendesk'
+
+ def __init__(self, zendesk_conn_id: str = default_conn_name) -> None:
super().__init__()
- self.__zendesk_conn_id = zendesk_conn_id
- self.__url = None
+ self.zendesk_conn_id = zendesk_conn_id
+ self.base_api: Optional[BaseApi] = None
+ zenpy_client, url = self._init_conn()
+ self.zenpy_client = zenpy_client
+ self.__url = url
+ # Keep reference to the _get method to allow arbitrary endpoint call
for
+ # backwards compatibility. (alternative to old ZendeskHook.call method)
+ self.get = self.zenpy_client.users._get
Review comment:
Ok great. I have removed this comment and added a simple example DAG to
illustrate this. (also added the `example DAGs` link to the doc)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]