Examples of AdvertiserRemote


Examples of com.google.api.ads.dfa.axis.v1_19.AdvertiserRemote

  private static final String ADVERTISER_NAME = "INSERT_ADVERTISER_NAME_HERE";

  public static void runExample(DfaServices dfaServices, DfaSession session, String advertiserName)
      throws Exception {
    // Request the advertiser service from the service client factory.
    AdvertiserRemote advertiserService = dfaServices.get(session, AdvertiserRemote.class);

    // Create the advertiser structure.
    Advertiser advertiser = new Advertiser();
    advertiser.setId(0);
    advertiser.setName(advertiserName);
    advertiser.setAdvertiserGroupId(0);
    advertiser.setApproved(true);

    // Create the advertiser.
    AdvertiserSaveResult advertiserSaveResult = advertiserService.saveAdvertiser(advertiser);

    // Display the advertiser ID.
    System.out.printf("Advertiser with ID \"%s\" was created.%n", advertiserSaveResult.getId());
  }
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_19.AdvertiserRemote

*/
public class GetAdvertisers {

  public static void runExample(DfaServices dfaServices, DfaSession session) throws Exception {
    // Request the advertiser service from the service client factory.
    AdvertiserRemote advertiserService = dfaServices.get(session, AdvertiserRemote.class);

    // Create advertiser search criteria structure.
    AdvertiserSearchCriteria advSearchCriteria = new AdvertiserSearchCriteria();
    advSearchCriteria.setPageSize(100);
    // When paging, start counting page numbers from 1 rather than 0.
    advSearchCriteria.setPageNumber(1);

    AdvertiserRecordSet advertiserRecordSet;
    int i = 1;

    do {
      // Get advertisers by criteria.
      advertiserRecordSet = advertiserService.getAdvertisers(
          advSearchCriteria);

      for (Advertiser result : advertiserRecordSet.getRecords()) {
        System.out.printf("%s) Advertiser with name \"%s\", ID \"%s\", and spotlight " +
            "configuration ID \"%s\" was found.%n", i++, result.getName(), result.getId(),
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.AdvertiserRemote

*/
public class GetAdvertisers {

  public static void runExample(DfaServices dfaServices, DfaSession session) throws Exception {
    // Request the advertiser service from the service client factory.
    AdvertiserRemote advertiserService = dfaServices.get(session, AdvertiserRemote.class);

    // Create advertiser search criteria structure.
    AdvertiserSearchCriteria advSearchCriteria = new AdvertiserSearchCriteria();
    advSearchCriteria.setPageSize(100);
    // When paging, start counting page numbers from 1 rather than 0.
    advSearchCriteria.setPageNumber(1);

    AdvertiserRecordSet advertiserRecordSet;
    int i = 1;

    do {
      // Get advertisers by criteria.
      advertiserRecordSet = advertiserService.getAdvertisers(
          advSearchCriteria);

      for (Advertiser result : advertiserRecordSet.getRecords()) {
        System.out.printf("%s) Advertiser with name \"%s\", ID \"%s\", and spotlight " +
            "configuration ID \"%s\" was found.%n", i++, result.getName(), result.getId(),
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.AdvertiserRemote

        .build();
  }

  public static void runExample(DfaServices dfaServices, DfaSession session) throws Exception {
    // Request the advertiser service from the service client factory.
    AdvertiserRemote advertiserService = dfaServices.get(session, AdvertiserRemote.class);

    // Create advertiser search criteria structure.
    AdvertiserSearchCriteria advSearchCriteria = new AdvertiserSearchCriteria();
    advSearchCriteria.setPageSize(100);
    // When paging, start counting page numbers from 1 rather than 0.
    advSearchCriteria.setPageNumber(1);

    AdvertiserRecordSet advertiserRecordSet;
    int i = 1;

    do {
      // Get advertisers by criteria.
      advertiserRecordSet = advertiserService.getAdvertisers(
          advSearchCriteria);

      for (Advertiser result : advertiserRecordSet.getRecords()) {
        System.out.printf("%s) Advertiser with name \"%s\", ID \"%s\", and spotlight " +
            "configuration ID \"%s\" was found.%n", i++, result.getName(), result.getId(),
View Full Code Here

Examples of com.google.api.ads.dfa.axis.v1_20.AdvertiserRemote

  private static final String ADVERTISER_NAME = "INSERT_ADVERTISER_NAME_HERE";

  public static void runExample(DfaServices dfaServices, DfaSession session, String advertiserName)
      throws Exception {
    // Request the advertiser service from the service client factory.
    AdvertiserRemote advertiserService = dfaServices.get(session, AdvertiserRemote.class);

    // Create the advertiser structure.
    Advertiser advertiser = new Advertiser();
    advertiser.setId(0);
    advertiser.setName(advertiserName);
    advertiser.setAdvertiserGroupId(0);
    advertiser.setApproved(true);

    // Create the advertiser.
    AdvertiserSaveResult advertiserSaveResult = advertiserService.saveAdvertiser(advertiser);

    // Display the advertiser ID.
    System.out.printf("Advertiser with ID \"%s\" was created.%n", advertiserSaveResult.getId());
  }
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.