route1io_connectors.google.dcm module
- connect_to_dcm(credentials: google.oauth2.credentials.Credentials) googleapiclient.discovery.Resource
Return a connection to Campaign Manager 360
- Parameters
credentials (google.oath2.credentials.Credentials) – Valid Credentials object with necessary authentication
- Returns
dcm – Connection to Google Sheets API
- Return type
googleapiclient.discovery.Resource
- get_dcm_data(dcm: googleapiclient.discovery.Resource, refresh_token: str, cid: str, csc: str, profile_id: str, report_id: str, fpath: str) pd.DataFrame
Return filepath to downloaded DCM fpath
- Parameters
dcm (googleapiclient.discovery.Resource) – Authenticated instance of DCM connection
profile_id (str) – Profile ID on DCM of the account that has access to the report
report_id (str) – Existing report on DCM that we want to create
fpath (str) – Local filepath to download report to
- Returns
fpath – Absolute filepath to the downloaded DCM report
- Return type
str