Package com.google.api.ads.dfp.jaxws.v201211

Examples of com.google.api.ads.dfp.jaxws.v201211.CustomCreativeAsset


    customCreative.setAdvertiserId(advertiserId);
    customCreative.setDestinationUrl("http://google.com");
    customCreative.setSize(size);

    // Set the custom creative image asset.
    CustomCreativeAsset customCreativeAsset = new CustomCreativeAsset();
    customCreativeAsset.setMacroName("IMAGE_ASSET");
    customCreativeAsset.setAssetByteArray(Media.getMediaDataFromUrl(
        "http://www.google.com/intl/en/adwords/select/images/samples/inline.jpg"));
    // Filenames must be unique.
    customCreativeAsset.setFileName(
        String.format("image%s.jpg", new Random().nextInt(Integer.MAX_VALUE)));
    customCreative.setCustomCreativeAssets(new CustomCreativeAsset[] {customCreativeAsset});

    // Set the HTML snippet using the custom creative asset macro.
    customCreative.setHtmlSnippet("<a href='%%CLICK_URL_UNESC%%%%DEST_URL%%'>" +
        "<img src='%%FILE:" + customCreativeAsset.getMacroName() + "%%'/>" +
        "</a><br>Click above for great deals!");

    // Create the creative on the server.
    Creative[] creatives =
        creativeService.createCreatives(new Creative[] {customCreative});
View Full Code Here


    customCreative.setAdvertiserId(advertiserId);
    customCreative.setDestinationUrl("http://google.com");
    customCreative.setSize(size);

    // Set the custom creative image asset.
    CustomCreativeAsset customCreativeAsset = new CustomCreativeAsset();
    customCreativeAsset.setMacroName("IMAGE_ASSET");
    customCreativeAsset.setAssetByteArray(Media.getMediaDataFromUrl(
        "http://www.google.com/intl/en/adwords/select/images/samples/inline.jpg"));
    // Filenames must be unique.
    customCreativeAsset.setFileName(
        String.format("image%s.jpg", new Random().nextInt(Integer.MAX_VALUE)));
    customCreative.setCustomCreativeAssets(new CustomCreativeAsset[] {customCreativeAsset});

    // Set the HTML snippet using the custom creative asset macro.
    customCreative.setHtmlSnippet("<a href='%%CLICK_URL_UNESC%%%%DEST_URL%%'>" +
        "<img src='%%FILE:" + customCreativeAsset.getMacroName() + "%%'/>" +
        "</a><br>Click above for great deals!");

    // Create the creative on the server.
    Creative[] creatives =
        creativeService.createCreatives(new Creative[] {customCreative});
View Full Code Here

    customCreative.setAdvertiserId(advertiserId);
    customCreative.setDestinationUrl("http://google.com");
    customCreative.setSize(size);

    // Set the custom creative image asset.
    CustomCreativeAsset customCreativeAsset = new CustomCreativeAsset();
    customCreativeAsset.setMacroName("IMAGE_ASSET");
    customCreativeAsset.setAssetByteArray(Media.getMediaDataFromUrl(
        "http://www.google.com/intl/en/adwords/select/images/samples/inline.jpg"));
    // Filenames must be unique.
    customCreativeAsset.setFileName(
        String.format("image%s.jpg", new Random().nextInt(Integer.MAX_VALUE)));
    customCreative.setCustomCreativeAssets(new CustomCreativeAsset[] {customCreativeAsset});

    // Set the HTML snippet using the custom creative asset macro.
    customCreative.setHtmlSnippet("<a href='%%CLICK_URL_UNESC%%%%DEST_URL%%'>" +
        "<img src='%%FILE:" + customCreativeAsset.getMacroName() + "%%'/>" +
        "</a><br>Click above for great deals!");

    // Create the creative on the server.
    Creative[] creatives =
        creativeService.createCreatives(new Creative[] {customCreative});
View Full Code Here

    customCreative.setAdvertiserId(advertiserId);
    customCreative.setDestinationUrl("http://google.com");
    customCreative.setSize(size);

    // Set the custom creative image asset.
    CustomCreativeAsset customCreativeAsset = new CustomCreativeAsset();
    customCreativeAsset.setMacroName("IMAGE_ASSET");
    customCreativeAsset.setAssetByteArray(Media.getMediaDataFromUrl(
        "http://www.google.com/intl/en/adwords/select/images/samples/inline.jpg"));
    // Filenames must be unique.
    customCreativeAsset.setFileName(
        String.format("image%s.jpg", new Random().nextInt(Integer.MAX_VALUE)));
    customCreative.setCustomCreativeAssets(new CustomCreativeAsset[] {customCreativeAsset});

    // Set the HTML snippet using the custom creative asset macro.
    customCreative.setHtmlSnippet("<a href='%%CLICK_URL_UNESC%%%%DEST_URL%%'>" +
        "<img src='%%FILE:" + customCreativeAsset.getMacroName() + "%%'/>" +
        "</a><br>Click above for great deals!");

    // Create the creative on the server.
    Creative[] creatives =
        creativeService.createCreatives(new Creative[] {customCreative});
View Full Code Here

      return (Value) value;
    } else if (value == null) {
      return new TextValue();
    } else {
      if (value instanceof Boolean) {
        BooleanValue booleanValue = new BooleanValue();
        booleanValue.setValue((Boolean) value);
        return booleanValue;
      } else if (value instanceof Double || value instanceof Long || value instanceof Integer) {
        NumberValue numberValue = new NumberValue();
        numberValue.setValue(value.toString());
        return numberValue;
View Full Code Here

    textValue2.setValue("value2");

    textValue3 = new TextValue();
    textValue3.setValue("value3");

    booleanValue1 = new BooleanValue();
    booleanValue1.setValue(false);

    booleanValue2 = new BooleanValue();
    booleanValue2.setValue(true);

    booleanValue3 = new BooleanValue();
    booleanValue3.setValue(false);

    numberValue1 = new NumberValue();
    numberValue1.setValue("1");
View Full Code Here

  }
 
  @Test
  public void testToString_null() {
    assertEquals("", Pql.toString(new TextValue()));
    assertEquals("", Pql.toString(new BooleanValue()));
    assertEquals("", Pql.toString(new NumberValue()));
    assertEquals("", Pql.toString(new DateTimeValue()));   
  }
View Full Code Here

  public PqlTest() {}

  @Before
  public void setUp() throws Exception {
    column1 = new ColumnType();
    column1.setLabelName("column1");

    column2 = new ColumnType();
    column2.setLabelName("column2");

    column3 = new ColumnType();
    column3.setLabelName("column3");

    textValue1 = new TextValue();
    textValue1.setValue("value1");
View Full Code Here

    numberValue3 = new NumberValue();
    numberValue3.setValue("-1");

    dateTime1 = new DateTime();
    Date date1 = new Date();
    date1.setYear(2012);
    date1.setMonth(12);
    date1.setDay(2);
    dateTime1.setDate(date1);
    dateTime1.setHour(12);
    dateTime1.setMinute(45);
    dateTime1.setSecond(0);
    dateTime1.setTimeZoneID(TIME_ZONE_ID1);
View Full Code Here

    numberValue2.setValue("1.02");

    numberValue3 = new NumberValue();
    numberValue3.setValue("-1");

    dateTime1 = new DateTime();
    Date date1 = new Date();
    date1.setYear(2012);
    date1.setMonth(12);
    date1.setDay(2);
    dateTime1.setDate(date1);
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.jaxws.v201211.CustomCreativeAsset

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.