Examples of CustomerSyncServiceInterface


Examples of com.google.api.ads.adwords.axis.v201306.ch.CustomerSyncServiceInterface

    // Get the CampaignService.
    CampaignServiceInterface campaignService =
        adWordsServices.get(session, CampaignServiceInterface.class);

    // Get the CustomerSyncService.
    CustomerSyncServiceInterface customerSyncService =
        adWordsServices.get(session, CustomerSyncServiceInterface.class);

    // Get a list of all campaign IDs.
    List<Long> campaignIds = new ArrayList<Long>();
    Selector selector = new Selector();
    selector.setFields(new String[] {"Id"});
    CampaignPage campaigns = campaignService.get(selector);
    if (campaigns.getEntries() != null) {
      for (Campaign campaign : campaigns.getEntries()) {
        campaignIds.add(campaign.getId());
      }
    }

    // Create date time range for the past 24 hours.
    DateTimeRange dateTimeRange = new DateTimeRange();
    dateTimeRange.setMin(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date(System
        .currentTimeMillis() - 1000L * 60 * 60 * 24)));
    dateTimeRange.setMax(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date()));

    // Create selector.
    CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
    customerSyncSelector.setDateTimeRange(dateTimeRange);
    customerSyncSelector
        .setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] {})));

    // Get all account changes for campaign.
    CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);

    // Display changes.
    if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
      System.out.println("Most recent change: "
          + accountChanges.getLastChangeTimestamp() + "\n");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201309.ch.CustomerSyncServiceInterface

    // Get the CampaignService.
    CampaignServiceInterface campaignService =
        adWordsServices.get(session, CampaignServiceInterface.class);

    // Get the CustomerSyncService.
    CustomerSyncServiceInterface customerSyncService =
        adWordsServices.get(session, CustomerSyncServiceInterface.class);

    // Get a list of all campaign IDs.
    List<Long> campaignIds = new ArrayList<Long>();
    Selector selector = new Selector();
    selector.setFields(new String[] {"Id"});
    CampaignPage campaigns = campaignService.get(selector);
    if (campaigns.getEntries() != null) {
      for (Campaign campaign : campaigns.getEntries()) {
        campaignIds.add(campaign.getId());
      }
    }

    // Create date time range for the past 24 hours.
    DateTimeRange dateTimeRange = new DateTimeRange();
    dateTimeRange.setMin(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date(System
        .currentTimeMillis() - 1000L * 60 * 60 * 24)));
    dateTimeRange.setMax(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date()));

    // Create selector.
    CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
    customerSyncSelector.setDateTimeRange(dateTimeRange);
    customerSyncSelector
        .setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] {})));

    // Get all account changes for campaign.
    CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);

    // Display changes.
    if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
      System.out.println("Most recent change: "
          + accountChanges.getLastChangeTimestamp() + "\n");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201402.ch.CustomerSyncServiceInterface

    // Get the CampaignService.
    CampaignServiceInterface campaignService =
        adWordsServices.get(session, CampaignServiceInterface.class);

    // Get the CustomerSyncService.
    CustomerSyncServiceInterface customerSyncService =
        adWordsServices.get(session, CustomerSyncServiceInterface.class);

    // Get a list of all campaign IDs.
    List<Long> campaignIds = new ArrayList<Long>();
    Selector selector = new SelectorBuilder()
        .fields("Id")
        .build();
    CampaignPage campaigns = campaignService.get(selector);
    if (campaigns.getEntries() != null) {
      for (Campaign campaign : campaigns.getEntries()) {
        campaignIds.add(campaign.getId());
      }
    }

    // Create date time range for the past 24 hours.
    DateTimeRange dateTimeRange = new DateTimeRange();
    dateTimeRange.setMin(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date(System
        .currentTimeMillis() - 1000L * 60 * 60 * 24)));
    dateTimeRange.setMax(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date()));

    // Create selector.
    CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
    customerSyncSelector.setDateTimeRange(dateTimeRange);
    customerSyncSelector
        .setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] {})));

    // Get all account changes for campaign.
    CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);

    // Display changes.
    if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
      System.out.println("Most recent change: "
          + accountChanges.getLastChangeTimestamp() + "\n");
View Full Code Here

Examples of com.google.api.ads.adwords.axis.v201406.ch.CustomerSyncServiceInterface

    // Get the CampaignService.
    CampaignServiceInterface campaignService =
        adWordsServices.get(session, CampaignServiceInterface.class);

    // Get the CustomerSyncService.
    CustomerSyncServiceInterface customerSyncService =
        adWordsServices.get(session, CustomerSyncServiceInterface.class);

    // Get a list of all campaign IDs.
    List<Long> campaignIds = new ArrayList<Long>();
    Selector selector = new SelectorBuilder()
        .fields("Id")
        .build();
    CampaignPage campaigns = campaignService.get(selector);
    if (campaigns.getEntries() != null) {
      for (Campaign campaign : campaigns.getEntries()) {
        campaignIds.add(campaign.getId());
      }
    }

    // Create date time range for the past 24 hours.
    DateTimeRange dateTimeRange = new DateTimeRange();
    dateTimeRange.setMin(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date(System
        .currentTimeMillis() - 1000L * 60 * 60 * 24)));
    dateTimeRange.setMax(new SimpleDateFormat("yyyyMMdd HHmmss").format(new Date()));

    // Create selector.
    CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
    customerSyncSelector.setDateTimeRange(dateTimeRange);
    customerSyncSelector
        .setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] {})));

    // Get all account changes for campaign.
    CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);

    // Display changes.
    if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
      System.out.println("Most recent change: "
          + accountChanges.getLastChangeTimestamp() + "\n");
View Full Code Here

Examples of com.google.api.adwords.v201306.ch.CustomerSyncServiceInterface

      // Get the CampaignService.
      CampaignServiceInterface campaignService =
          user.getService(AdWordsService.V201306.CAMPAIGN_SERVICE);

      // Get the CustomerSyncService.
      CustomerSyncServiceInterface customerSyncService =
          user.getService(AdWordsService.V201306.CUSTOMER_SYNC_SERVICE);

      // Get a list of all campaign IDs.
      List<Long> campaignIds = new ArrayList<Long>();
      Selector selector = new Selector();
      selector.setFields(new String[] {"Id"});
      CampaignPage campaigns = campaignService.get(selector);
      if (campaigns.getEntries() != null) {
        for (Campaign campaign : campaigns.getEntries()) {
          campaignIds.add(campaign.getId());
        }
      }

      // Create date time range for the past 24 hours.
      DateTimeRange dateTimeRange = new DateTimeRange();
      dateTimeRange.setMin(new SimpleDateFormat("yyyyMMdd hhmmss").format(new Date(System
          .currentTimeMillis() - 1000L * 60 * 60 * 24)));
      dateTimeRange.setMax(new SimpleDateFormat("yyyyMMdd hhmmss").format(new Date()));

      // Create selector.
      CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
      customerSyncSelector.setDateTimeRange(dateTimeRange);
      customerSyncSelector
          .setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] {})));

      // Get all account changes for campaign.
      CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);

      // Display changes.
      if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
        System.out.println("Most recent change: "
            + accountChanges.getLastChangeTimestamp() + "\n");
View Full Code Here

Examples of com.google.api.adwords.v201309.ch.CustomerSyncServiceInterface

      // Get the CampaignService.
      CampaignServiceInterface campaignService =
          user.getService(AdWordsService.V201309.CAMPAIGN_SERVICE);

      // Get the CustomerSyncService.
      CustomerSyncServiceInterface customerSyncService =
          user.getService(AdWordsService.V201309.CUSTOMER_SYNC_SERVICE);

      // Get a list of all campaign IDs.
      List<Long> campaignIds = new ArrayList<Long>();
      Selector selector = new Selector();
      selector.setFields(new String[] {"Id"});
      CampaignPage campaigns = campaignService.get(selector);
      if (campaigns.getEntries() != null) {
        for (Campaign campaign : campaigns.getEntries()) {
          campaignIds.add(campaign.getId());
        }
      }

      // Create date time range for the past 24 hours.
      DateTimeRange dateTimeRange = new DateTimeRange();
      dateTimeRange.setMin(new SimpleDateFormat("yyyyMMdd hhmmss").format(new Date(System
          .currentTimeMillis() - 1000L * 60 * 60 * 24)));
      dateTimeRange.setMax(new SimpleDateFormat("yyyyMMdd hhmmss").format(new Date()));

      // Create selector.
      CustomerSyncSelector customerSyncSelector = new CustomerSyncSelector();
      customerSyncSelector.setDateTimeRange(dateTimeRange);
      customerSyncSelector
          .setCampaignIds(ArrayUtils.toPrimitive(campaignIds.toArray(new Long[] {})));

      // Get all account changes for campaign.
      CustomerChangeData accountChanges = customerSyncService.get(customerSyncSelector);

      // Display changes.
      if (accountChanges != null && accountChanges.getChangedCampaigns() != null) {
        System.out.println("Most recent change: "
            + accountChanges.getLastChangeTimestamp() + "\n");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.