Examples of BudgetSuggestionSelector


Examples of com.google.api.ads.adwords.axis.v201406.express.BudgetSuggestionSelector

  public static BudgetSuggestion runExample(AdWordsServices adWordsServices, AdWordsSession session)
      throws Exception {
    BudgetSuggestionServiceInterface service =
        adWordsServices.get(session, BudgetSuggestionServiceInterface.class);

    BudgetSuggestionSelector selector = new BudgetSuggestionSelector();

    List<Criterion> criteria = Lists.newArrayList();

    // Criterion - Travel Agency product/service. See GetProductServices.java for an example
    // of how to get valid product/service settings.
    ProductService productService = new ProductService();
    productService.setText("Travel Agency");
    productService.setLocale("en_US");
    criteria.add(productService);

    // Criterion - English language.
    // The ID can be found in the documentation:
    // https://developers.google.com/adwords/api/docs/appendix/languagecodes
    Language language = new Language();
    language.setId(1000L);
    criteria.add(language);

    // Criterion - Mountain View, California location.
    // The ID can be found in the documentation:
    // https://developers.google.com/adwords/api/docs/appendix/geotargeting
    // https://developers.google.com/adwords/api/docs/appendix/cities-DMAregions
    Location location = new Location();
    location.setId(1014044L);
    criteria.add(location);

    selector.setCriteria(criteria.toArray(new Criterion[criteria.size()]));

    BudgetSuggestion budgetSuggestion = service.get(selector);
   
    System.out.printf("Budget suggestion for criteria is:%n"
        + "\tSuggestedBudget=%s%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.