| :py:mod:`airflow.providers.dingding.hooks.dingding` |
| =================================================== |
| |
| .. py:module:: airflow.providers.dingding.hooks.dingding |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.dingding.hooks.dingding.DingdingHook |
| |
| |
| |
| |
| .. py:class:: DingdingHook(dingding_conn_id='dingding_default', message_type = 'text', message = None, at_mobiles = None, at_all = False, *args, **kwargs) |
| |
| Bases: :py:obj:`airflow.providers.http.hooks.http.HttpHook` |
| |
| This hook allows you send Dingding message using Dingding custom bot. |
| Get Dingding token from conn_id.password. And prefer set domain to |
| conn_id.host, if not will use default ``https://oapi.dingtalk.com``. |
| |
| For more detail message in |
| `Dingding custom bot <https://open-doc.dingtalk.com/microapp/serverapi2/qf2nxq>`_ |
| |
| :param dingding_conn_id: The name of the Dingding connection to use |
| :param message_type: Message type you want to send to Dingding, support five type so far |
| including text, link, markdown, actionCard, feedCard |
| :param message: The message send to Dingding chat group |
| :param at_mobiles: Remind specific users with this message |
| :param at_all: Remind all people in group or not. If True, will overwrite ``at_mobiles`` |
| |
| .. py:attribute:: conn_name_attr |
| :annotation: = dingding_conn_id |
| |
| |
| |
| .. py:attribute:: default_conn_name |
| :annotation: = dingding_default |
| |
| |
| |
| .. py:attribute:: conn_type |
| :annotation: = dingding |
| |
| |
| |
| .. py:attribute:: hook_name |
| :annotation: = Dingding |
| |
| |
| |
| .. py:method:: get_conn(self, headers = None) |
| |
| Overwrite HttpHook get_conn because just need base_url and headers and |
| not don't need generic params |
| |
| :param headers: additional headers to be passed through as a dictionary |
| |
| |
| .. py:method:: send(self) |
| |
| Send Dingding message |
| |
| |
| |