Package com.google.api.ads.adwords.jaxws.v201309.o

Examples of com.google.api.ads.adwords.jaxws.v201309.o.TargetingIdeaSelector


  /**
   * Test whether we can request average targeted monthly search parameter.
   */
  public void testGetAverageTargetedMonthlySearchesSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    AverageTargetedMonthlySearchesSearchParameter averageTargetedMonthlySearchesSearchParameter =
        new AverageTargetedMonthlySearchesSearchParameter();
    averageTargetedMonthlySearchesSearchParameter
        .setOperation(new LongComparisonOperation(1L, 50L));

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("election");
    keyword.setMatchType(KeywordMatchType.BROAD);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        averageTargetedMonthlySearchesSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here


  /**
   * Test whether we can request competition search parameter.
   */
  public void testGetCampetitionoSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    CompetitionSearchParameter competitionSearchParameter = new CompetitionSearchParameter();
    CompetitionSearchParameterLevel[] levels = {CompetitionSearchParameterLevel.MEDIUM,
        CompetitionSearchParameterLevel.HIGH};
    competitionSearchParameter.setLevels(levels);

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("election");
    keyword.setMatchType(KeywordMatchType.BROAD);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        competitionSearchParameter,relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request country target search parameter.
   */
  public void testGetCountryTargetSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    CountryTargetSearchParameter countryTargetSearchParameter =
        new CountryTargetSearchParameter();
    CountryTarget[] targets = {new CountryTarget(null, null, "US"),
        new CountryTarget(null, null, "CN"), new CountryTarget(null, null, "JP")};
    countryTargetSearchParameter.setCountryTargets(targets);

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("election");
    keyword.setMatchType(KeywordMatchType.BROAD);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        countryTargetSearchParameter,relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request excluded keyword search parameter.
   */
  public void testGetExcludedKeyWordSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    ExcludedKeywordSearchParameter excludedKeywordSearchParameter =
        new ExcludedKeywordSearchParameter();
    Keyword keyword1 = new Keyword();
    keyword1.setText("media player");
    keyword1.setMatchType(KeywordMatchType.EXACT);
    excludedKeywordSearchParameter.setKeywords(new Keyword[] {keyword1});

    KeywordMatchTypeSearchParameter keywordMatchTypeSearchParameter =
        new KeywordMatchTypeSearchParameter();
    keywordMatchTypeSearchParameter.setKeywordMatchTypes(new KeywordMatchType[] {
        KeywordMatchType.BROAD, KeywordMatchType.EXACT});

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword2 = new Keyword();
    keyword2.setText("dvd player");
    keyword2.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword2});

    selector.setSearchParameters(new SearchParameter[] {
        excludedKeywordSearchParameter, keywordMatchTypeSearchParameter,
        relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request global monthly search parameter.
   */
  public void testGlobalMonthlySearchesSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    GlobalMonthlySearchesSearchParameter globalMonthlySearchesSearchParameter =
        new GlobalMonthlySearchesSearchParameter();
    LongComparisonOperation longComparisonOperation = new LongComparisonOperation();
    longComparisonOperation.setMinimum(new Long(1000));
    longComparisonOperation.setMaximum(new Long(10000));
    globalMonthlySearchesSearchParameter.setOperation(longComparisonOperation);

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("dvd player");
    keyword.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        globalMonthlySearchesSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request keyword category id search parameter.
   */
  public void testGetIncludeAdultContentSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    KeywordCategoryIdSearchParameter keywordCategoryIdSearchParameter =
        new KeywordCategoryIdSearchParameter(null, new Integer(5));

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("presidential vote");
    keyword.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        keywordCategoryIdSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request keyword match type search parameter.
   */
  public void testGetKeywordMatchTypeSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    KeywordMatchTypeSearchParameter keywordMatchTypeSearchParameter =
        new KeywordMatchTypeSearchParameter();
    keywordMatchTypeSearchParameter.setKeywordMatchTypes(new KeywordMatchType[] {
        KeywordMatchType.BROAD, KeywordMatchType.EXACT});

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("presidential vote");
    keyword.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        keywordMatchTypeSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request language target search parameter.
   */
  public void testGetLanguageTargetSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    LanguageTargetSearchParameter languageTargetSearchParameter =
        new LanguageTargetSearchParameter();
    LanguageTarget[] targets = {
        new LanguageTarget(null, "cn"), new LanguageTarget(null, "jp")};
    languageTargetSearchParameter.setLanguageTargets(targets);

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("presidential vote");
    keyword.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        languageTargetSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request mobile search parameter.
   */
  public void testGetMobileSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    MobileSearchParameter mobileSearchParameter = new MobileSearchParameter();

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("presidential vote");
    keyword.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        mobileSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

  /**
   * Test whether we can request idea text matches search parameter.
   */
  public void testGetIdeaTextMatchesSearchParameter() throws Exception {
    // Create selector and parameters.
    TargetingIdeaSelector selector = new TargetingIdeaSelector();

    IdeaTextMatchesSearchParameter ideaTextMatchesSearchParameter =
        new IdeaTextMatchesSearchParameter();
    ideaTextMatchesSearchParameter.setIncluded(new String[] {"presidential vote"});

    RelatedToKeywordSearchParameter relatedToKeywordSearchParameter =
        new RelatedToKeywordSearchParameter();
    Keyword keyword = new Keyword();
    keyword.setText("presidential vote");
    keyword.setMatchType(KeywordMatchType.EXACT);
    relatedToKeywordSearchParameter.setKeywords(new Keyword[] {keyword});

    selector.setSearchParameters(new SearchParameter[] {
        ideaTextMatchesSearchParameter, relatedToKeywordSearchParameter});

    selector.setIdeaType(IdeaType.KEYWORD);
    selector.setRequestType(RequestType.IDEAS);

    Paging paging = new Paging(0, 1);
    selector.setPaging(paging);

    TargetingIdeaPage page = service.get(selector);
  }
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.jaxws.v201309.o.TargetingIdeaSelector

Copyright © 2018 www.massapicom. 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.