Package com.google.api.adwords.v201008.cm

Examples of com.google.api.adwords.v201008.cm.AdGroupAd


   */
  public void testGetAllForCampaign() throws Exception {
    // Create selector.
    CampaignAdExtensionSelector selector = new CampaignAdExtensionSelector();
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new CampaignAdExtensionStatsSelector(range, null));
    selector.setCampaignIds(new long[] {campaignId});
    selector.setStatuses(new CampaignAdExtensionStatus[] {CampaignAdExtensionStatus.ACTIVE,
        CampaignAdExtensionStatus.DELETED});

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


    budget.setAmount(new Money(null, 50000000L));
    budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    campaign.setBudget(budget);

    // Create operations.
    CampaignOperation operation = new CampaignOperation();
    operation.setOperand(campaign);
    operation.setOperator(Operator.ADD);

    CampaignOperation[] operations = new CampaignOperation[] {operation};

    CampaignReturnValue result = service.mutate(operations);
View Full Code Here

  public void testInvalidCreateCampaign() throws Exception {
    // Create campaign.
    Campaign campaign = new Campaign();

    // Create operations.
    CampaignOperation operation = new CampaignOperation();
    operation.setOperand(campaign);
    operation.setOperator(Operator.ADD);

    CampaignOperation[] operations = new CampaignOperation[] {operation};

    CampaignReturnValue result;
    try {
View Full Code Here

   * Test getting all campaign ad extension for a campaign.
   */
  public void testGetAllForCampaign() throws Exception {
    // Create selector.
    CampaignAdExtensionSelector selector = new CampaignAdExtensionSelector();
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new CampaignAdExtensionStatsSelector(range, null));
    selector.setCampaignIds(new long[] {campaignId});
    selector.setStatuses(new CampaignAdExtensionStatus[] {CampaignAdExtensionStatus.ACTIVE,
        CampaignAdExtensionStatus.DELETED});

View Full Code Here

    // Create ad selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setAdIds(new long[] {adId});

    // Create date range.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new AdStatsSelector(range, null));

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);
View Full Code Here

    address.setProvinceCode("US-CA");
    address.setPostalCode("94043");
    address.setCountryCode("US");

    // Create geo location selector.
    GeoLocationSelector selector = new GeoLocationSelector();
    selector.setAddresses(new Address[] {address});

    GeoLocation[] geoLocations = service.get(selector);

    assertNotNull(geoLocations);
    assertTrue("Expected at least 1 entry", geoLocations.length >= 1);
View Full Code Here

  private AdExtension[] adExtensionProvider() {
    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(new Address("76 9th Ave", null, "New York", "NY", "NY", "10011",
        "US"));
    locationExtension.setGeoPoint(new GeoPoint(new Integer(40742412), new Integer(-74004378)));
    String encoded = "qrvM3QDB3iJsdO58XYyix7YGjYhU+jHs3GR0J6uqpGp55fMTsorT5ZLH69crnCWnM3"
        + "FVAFDO9Un4HNbc5/ORF0Y8hZL/sPevCyxMrjZ2gmwbQwi2fvDB2J7RhyWSV4uWA3LT"
        + "0sdG2b22nH34uDh88XZyTyZMk0Fgc6wmmIwKSlUdYlyCzJ00Qd2JGboNgcWnVeHC8c"
        + "bGd4BzGR839qM7tGXlW5TvuGUs/lz3WjScPbHY8L0TfYcv2JV3c88di7qZJem7XV9I"
        + "Qqm3SFfWOwyC6K3y1v9p+V3twZoBCf02QVZFiohpTzau9Bj6hbXNoB7LKMHK1skduI"
View Full Code Here

  /**
   * Provides ad extensions.
   */
  private AdExtension[] adExtensionProvider() {
    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(new Address("76 9th Ave", null, "New York", "NY", "NY", "10011",
        "US"));
    locationExtension.setGeoPoint(new GeoPoint(new Integer(40742412), new Integer(-74004378)));
    String encoded = "qrvM3QDB3iJsdO58XYyix7YGjYhU+jHs3GR0J6uqpGp55fMTsorT5ZLH69crnCWnM3"
        + "FVAFDO9Un4HNbc5/ORF0Y8hZL/sPevCyxMrjZ2gmwbQwi2fvDB2J7RhyWSV4uWA3LT"
        + "0sdG2b22nH34uDh88XZyTyZMk0Fgc6wmmIwKSlUdYlyCzJ00Qd2JGboNgcWnVeHC8c"
        + "bGd4BzGR839qM7tGXlW5TvuGUs/lz3WjScPbHY8L0TfYcv2JV3c88di7qZJem7XV9I"
        + "Qqm3SFfWOwyC6K3y1v9p+V3twZoBCf02QVZFiohpTzau9Bj6hbXNoB7LKMHK1skduI"
        + "gs854r83tIp1FevrxVNp3S7npNDcQaNAMHoYzX8iDGASwR8sWg2JUYeiTns6AihCAp"
        + "QmwNTdYHhhgh75B9PqYpSA5ghBWr0xWpiZBnM9713DwvG4LCD2smG43VAGUUrCVknw"
        + "rMxS/XSoF6NMzAFi648SglPozoGrLPdQ/4IbaIr91yAJpegOGivQPQ7NMLc2ClnYt5"
        + "mj/IzHjNK7u1WDJFW2CF0Kw+/50zljzvWDVUiBxGha7da7ihyuR32D+uCJOM+HsCgA==";
    locationExtension.setEncodedLocation(Base64.decodeBase64(encoded.getBytes()));

    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("(212) 565-0000");
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    return new AdExtension[] {locationExtension};
  }
View Full Code Here

        user.getService(AdWordsService.V201008.CAMPAIGN_SERVICE);

    // Create campaign.
    Campaign campaign = new Campaign();
    campaign.setName("Test Campaign #" + System.currentTimeMillis());
    campaign.setBiddingStrategy(new ManualCPC());
    campaign.setStatus(CampaignStatus.PAUSED);

    // Create budget
    Budget budget = new Budget();
    budget.setPeriod(BudgetBudgetPeriod.DAILY);
View Full Code Here

    adGroup.setName("Earth to Mars Cruises #" + System.currentTimeMillis());
    adGroup.setStatus(AdGroupStatus.ENABLED);
    adGroup.setCampaignId(campaignId);

    // Create ad group bid.
    ManualCPCAdGroupBids adGroupBids = new ManualCPCAdGroupBids();
    adGroupBids.setKeywordMaxCpc(new Bid(new Money(null, 10000000L)));
    adGroup.setBids(adGroupBids);

    // Create operations.
    AdGroupOperation operation = new AdGroupOperation();
    operation.setOperand(adGroup);
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201008.cm.AdGroupAd

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.