blob: 7014af8843eaacb063cce5dfcd1052e1156133c4 [file] [log] [blame]
:py:mod:`airflow.providers.google.marketing_platform.hooks.display_video`
=========================================================================
.. py:module:: airflow.providers.google.marketing_platform.hooks.display_video
.. autoapi-nested-parse::
This module contains Google DisplayVideo hook.
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.google.marketing_platform.hooks.display_video.GoogleDisplayVideo360Hook
.. py:class:: GoogleDisplayVideo360Hook(api_version = 'v1', gcp_conn_id = 'google_cloud_default', delegate_to = None, impersonation_chain = None)
Bases: :py:obj:`airflow.providers.google.common.hooks.base_google.GoogleBaseHook`
Hook for Google Display & Video 360.
.. py:method:: get_conn()
Retrieves connection to DisplayVideo.
.. py:method:: get_conn_to_display_video()
Retrieves connection to DisplayVideo.
.. py:method:: erf_uri(partner_id, entity_type)
:staticmethod:
Return URI for all Entity Read Files in bucket.
For example, if you were generating a file name to retrieve the entity read file
for partner 123 accessing the line_item table from April 2, 2013, your filename
would look something like this:
gdbm-123/entity/20130402.0.LineItem.json
More information:
https://developers.google.com/bid-manager/guides/entity-read/overview
:param partner_id The numeric ID of your Partner.
:param entity_type: The type of file Partner, Advertiser, InsertionOrder,
LineItem, Creative, Pixel, InventorySource, UserList, UniversalChannel, and summary.
.. py:method:: create_query(query)
Creates a query.
:param query: Query object to be passed to request body.
.. py:method:: delete_query(query_id)
Deletes a stored query as well as the associated stored reports.
:param query_id: Query ID to delete.
.. py:method:: get_query(query_id)
Retrieves a stored query.
:param query_id: Query ID to retrieve.
.. py:method:: list_queries()
Retrieves stored queries.
.. py:method:: run_query(query_id, params)
Runs a stored query to generate a report.
:param query_id: Query ID to run.
:param params: Parameters for the report.
.. py:method:: upload_line_items(line_items)
Uploads line items in CSV format.
:param line_items: downloaded data from GCS and passed to the body request
:return: response body.
:rtype: List[Dict[str, Any]]
.. py:method:: download_line_items(request_body)
Retrieves line items in CSV format.
:param request_body: dictionary with parameters that should be passed into.
More information about it can be found here:
https://developers.google.com/bid-manager/v1.1/lineitems/downloadlineitems
.. py:method:: create_sdf_download_operation(body_request)
Creates an SDF Download Task and Returns an Operation.
:param body_request: Body request.
More information about body request n be found here:
https://developers.google.com/display-video/api/reference/rest/v1/sdfdownloadtasks/create
.. py:method:: get_sdf_download_operation(operation_name)
Gets the latest state of an asynchronous SDF download task operation.
:param operation_name: The name of the operation resource.
.. py:method:: download_media(resource_name)
Downloads media.
:param resource_name: of the media that is being downloaded.