Package com.google.api.adwords.v200909.cm

Examples of com.google.api.adwords.v200909.cm.Keyword


          adGroup = adGroupReturnValue.getValue()[0];
        }

        int numAds = generator.nextInt(10) + 1;
        for (int k = 0; k < numAds; k++) {
          TextAd ad = new TextAd();
          ad.setDescription1("This is the description");
          ad.setDescription2("Second line of the description");
          ad.setHeadline("This is the headline " + generator.nextInt(5000));
          ad.setDisplayUrl("http://google.com/");
          ad.setUrl("http://example.com");

          AdGroupAd adGroupAd = new AdGroupAd();
          adGroupAd.setAd(ad);
          adGroupAd.setAdGroupId(adGroup.getId());

          adGroupAdService.mutate(new AdGroupAdOperation[] {new AdGroupAdOperation(Operator.ADD,
              "ADD", adGroupAd, null)});
        }

        numAds = generator.nextInt(10) + 1;
        for (int k = 0; k < numAds; k++) {
          ImageAd ad = new ImageAd();
          Image image = new Image();
          image.setData(DataUtils.getTestImage());
          image.setName("name.jpg");
          ad.setImage(image);
          ad.setDisplayUrl("http://google.com/");
          ad.setUrl("http://example.com");
          ad.setName("name.jpg");

          AdGroupAd adGroupAd = new AdGroupAd();
          adGroupAd.setAd(ad);
          adGroupAd.setAdGroupId(adGroup.getId());
View Full Code Here


    // Get the AdGroupCriterionService.
    AdGroupCriterionServiceInterface adGroupCriterionService =
        user.getService(AdWordsService.V201008.ADGROUP_CRITERION_SERVICE);

    // Create keyword.
    Keyword keyword = new Keyword();
    keyword.setText("mars cruise");
    keyword.setMatchType(KeywordMatchType.BROAD);

    // Create biddable ad group criterion.
    BiddableAdGroupCriterion keywordBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
    keywordBiddableAdGroupCriterion.setAdGroupId(adGroupId);
    keywordBiddableAdGroupCriterion.setCriterion(keyword);
View Full Code Here

    // Get the CampaignCriterionService.
    CampaignCriterionServiceInterface campaignCriterionService =
        user.getService(AdWordsService.V201008.CAMPAIGN_CRITERION_SERVICE);

    // Create keyword.
    Keyword keyword = new Keyword();
    keyword.setText("jupiter cruise");
    keyword.setMatchType(KeywordMatchType.BROAD);

    // Create negative campaign criterion.
    NegativeCampaignCriterion negativeCampaignCriterion = new NegativeCampaignCriterion();
    negativeCampaignCriterion.setCampaignId(campaignId);
    negativeCampaignCriterion.setCriterion(keyword);
View Full Code Here

  /**
   * Test adding a negative campaign criterion.
   */
  public void testAddNegative() throws Exception {
    // Create keyword.
    Keyword keyword = new Keyword();
    keyword.setText("mars cruise");
    keyword.setMatchType(KeywordMatchType.BROAD);

    // Create negative campaign criterion.
    NegativeCampaignCriterion criterion = new NegativeCampaignCriterion();
    criterion.setCampaignId(campaignId);
    criterion.setCriterion(keyword);
View Full Code Here

  /**
   * Test adding a biddable ad group criterion.
   */
  public void testAddBiddable() throws Exception {
    // Create keyword.
    Keyword keyword = new Keyword();
    keyword.setText("mars cruise");
    keyword.setMatchType(KeywordMatchType.BROAD);

    // Create biddable ad group criterion.
    BiddableAdGroupCriterion criterion = new BiddableAdGroupCriterion();
    criterion.setAdGroupId(adGroupId);
    criterion.setCriterion(keyword);
View Full Code Here

  /**
   * Test adding a negative ad group criterion.
   */
  public void testAddNegative() throws Exception {
    // Create keyword.
    Keyword keyword = new Keyword();
    keyword.setText("jupiter cruise");
    keyword.setMatchType(KeywordMatchType.BROAD);

    // Create biddable ad group criterion.
    NegativeAdGroupCriterion criterion = new NegativeAdGroupCriterion();
    criterion.setAdGroupId(adGroupId);
    criterion.setCriterion(keyword);
View Full Code Here

    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});
View Full Code Here

        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});
View Full Code Here

        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});
View Full Code Here

    // 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});
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v200909.cm.Keyword

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.