How to use the googleads.dfa.DfaClient.LoadFromStorage function in googleads

To help you get started, we’ve selected a few googleads examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github googleads / googleads-python-lib / examples / dfa / v1_20 / create_in_stream_video_creative.py View on Github external
'description': 'You are viewing an In-Stream Video Creative',
      'surveyUrl': survey_url,
      'clickThroughUrl': click_through_url
  }

  # Save the In-Stream video creative.
  result = creative_service.saveCreative(
      in_stream_video_creative, campaign_id)

  # Display the new creative ID.
  print 'In-Stream video creative with ID \'%s\' was created.' % result['Id']


if __name__ == '__main__':
  # Initialize client object.
  dfa_client = dfa.DfaClient.LoadFromStorage()
  main(dfa_client, ADVERTISER_ID, VIDEO_DURATION, AD_ID, SURVEY_URL,
       CLICK_THROUGH_URL, CAMPAIGN_ID)
github googleads / googleads-python-lib / examples / dfa / v1_20 / add_advertiser_user_filter.py View on Github external
# Add the filter to the user.
  user['advertiserUserFilter'] = advertiser_filter

  # Save the changes made and display a success message.
  result = user_service.saveUser(user)

  if result:
    print 'User with ID \'%s\' was modified.' % result['id']
  else:
    print 'No user was modified.'


if __name__ == '__main__':
  # Initialize client object.
  dfa_client = dfa.DfaClient.LoadFromStorage()
  main(dfa_client, USER_ID, ADVERTISER_ID)
github googleads / googleads-python-lib / examples / dfa / v1_20 / get_campaigns.py View on Github external
# Display campaign names and IDs.
    if results['records']:
      for campaign in results['records']:
        print ('Campaign with name \'%s\' and ID \'%s\' was found.'
               % (campaign['name'], campaign['id']))
    page_number += 1
    campaign_search_criteria['pageNumber'] = str(page_number)
    if page_number > int(results['totalNumberOfPages']):
      break

  print 'Number of results found: %s' % results['totalNumberOfRecords']


if __name__ == '__main__':
  # Initialize client object.
  dfa_client = dfa.DfaClient.LoadFromStorage()
  main(dfa_client)
github googleads / googleads-python-lib / examples / dfa / v1_20 / get_user_filter_types.py View on Github external
# Get user filter criteria types.
  results = user_service.getAvailableUserFilterCriteriaTypes()

  # Display user filter criteria types.
  if results:
    for filter_type in results:
      print ('User filter criteria type with name \'%s\' and ID \'%s\' was '
             'found.' % (filter_type['name'], filter_type['id']))
  else:
    print 'No user filter criteria types found.'


if __name__ == '__main__':
  # Initialize client object.
  dfa_client = dfa.DfaClient.LoadFromStorage()
  main(dfa_client)