Package com.google.api.ads.dfa.axis.v1_20

Examples of com.google.api.ads.dfa.axis.v1_20.AdvertiserGroupRemote


  public static void runExample(DfaServices dfaServices, DfaSession session) throws Exception {
    // Request the service.
    SpotlightRemote service = dfaServices.get(session, SpotlightRemote.class);

    // Set search criteria.
    CountrySearchCriteria countrySearchCriteria = new CountrySearchCriteria ();
    countrySearchCriteria.setSecure(false);

    // Get countries.
    Country[] countries = service.getCountriesByCriteria(countrySearchCriteria);

    // Display country names, codes and secure server support information.
View Full Code Here


      long creativeId) throws Exception {
    // Request the creative service from the service client factory.
    CreativeRemote creativeService = dfaServices.get(session, CreativeRemote.class);

    // Create the In-Stream video creative asset.
    CreativeAsset inStreamVideoAsset = new CreativeAsset();
    inStreamVideoAsset.setName(assetName);
    inStreamVideoAsset.setContent(Media.getMediaDataFromFile(pathToFile));

    // Create an upload request to make this asset a media file for an existing
    // In-Stream creative.
    InStreamAssetUploadRequest inStreamAssetUploadRequest = new InStreamAssetUploadRequest();
    inStreamAssetUploadRequest.setMediaFile(true);
View Full Code Here

      long advertiserId) throws Exception {
    // Request the service.
    CreativeRemote service = dfaServices.get(session, CreativeRemote.class);

    // Create the HTML asset.
    CreativeAsset swfAsset = new CreativeAsset();
    swfAsset.setForHTMLCreatives(true);
    swfAsset.setName(assetName);
    swfAsset.setContent(Media.getMediaDataFromFile(pathToFile));
    swfAsset.setAdvertiserId(advertiserId);

    // Save the asset.
    CreativeAssetSaveResult creativeAssetSaveResult = service.saveCreativeAsset(swfAsset);

    // Display the new asset file name.
View Full Code Here

      long advertiserId) throws Exception {
    // Request the service.
    CreativeRemote service = dfaServices.get(session, CreativeRemote.class);

    // Create the mobile asset.
    CreativeAsset mobileAsset = new CreativeAsset();
    mobileAsset.setName(assetName);
    mobileAsset.setContent(Media.getMediaDataFromFile(pathToFile));
    mobileAsset.setForHTMLCreatives(true);
    mobileAsset.setAdvertiserId(advertiserId);

    // Save the mobile asset.
    CreativeAssetSaveResult creativeAssetSaveResult = service.saveCreativeAsset(mobileAsset);

    // Display the new asset file name.
View Full Code Here

      long advertiserId) throws Exception {
    // Request the creative service from the service client factory.
    CreativeRemote creativeService = dfaServices.get(session, CreativeRemote.class);

    // Create the image asset.
    CreativeAsset imgAsset = new CreativeAsset();
    imgAsset.setForHTMLCreatives(false);
    imgAsset.setName(assetName);
    imgAsset.setContent(Media.getMediaDataFromFile(pathToFile));
    imgAsset.setAdvertiserId(advertiserId);

    // Save the image asset.
    CreativeAssetSaveResult creativeAssetSaveResult = creativeService.saveCreativeAsset(
        imgAsset);
View Full Code Here

      long creativeId, String assetToReplace) throws Exception {
    // Request the creative service from the service client factory.
    CreativeRemote creativeService = dfaServices.get(session, CreativeRemote.class);

    // Create the In-Stream creative asset.
    CreativeAsset inStreamVideoAsset = new CreativeAsset();
    inStreamVideoAsset.setName(assetName);
    inStreamVideoAsset.setContent(Media.getMediaDataFromFile(pathToFile));

    // Create an upload request to make this asset a companion ad file for an
    // existing In-Stream video creative.
    InStreamAssetUploadRequest inStreamAssetUploadRequest = new InStreamAssetUploadRequest();
    inStreamAssetUploadRequest.setCompanion(true);
View Full Code Here

    swfAsset.setName(assetName);
    swfAsset.setContent(Media.getMediaDataFromFile(pathToFile));
    swfAsset.setAdvertiserId(advertiserId);

    // Save the asset.
    CreativeAssetSaveResult creativeAssetSaveResult = service.saveCreativeAsset(swfAsset);

    // Display the new asset file name.
    System.out.printf("Asset was saved with file name of \"%s\".%n",
        creativeAssetSaveResult.getSavedFilename());
  }
View Full Code Here

    mobileAsset.setContent(Media.getMediaDataFromFile(pathToFile));
    mobileAsset.setForHTMLCreatives(true);
    mobileAsset.setAdvertiserId(advertiserId);

    // Save the mobile asset.
    CreativeAssetSaveResult creativeAssetSaveResult = service.saveCreativeAsset(mobileAsset);

    // Display the new asset file name.
    System.out.printf("Asset was saved with file name of \"%s\".%n",
        creativeAssetSaveResult.getSavedFilename());
  }
View Full Code Here

    imgAsset.setName(assetName);
    imgAsset.setContent(Media.getMediaDataFromFile(pathToFile));
    imgAsset.setAdvertiserId(advertiserId);

    // Save the image asset.
    CreativeAssetSaveResult creativeAssetSaveResult = creativeService.saveCreativeAsset(
        imgAsset);

    // Display the new asset file name.
    System.out.printf("Asset was saved with file name of \"%s\".%n",
        creativeAssetSaveResult.getSavedFilename());
  }
View Full Code Here

      throws Exception {
    // Request the creative service from the service client factory.
    CreativeRemote creativeService = dfaServices.get(session, CreativeRemote.class);

    // Fetch the In-Stream video creative which contains the asset to modify.
    CreativeBase rawCreative = creativeService.getCreative(creativeId);

    if (!(rawCreative instanceof InStreamVideoCreative)) {
      System.out.printf("Unable to update creative with ID \"%s\": not an In-Stream video "
          + "creative.", creativeId);
    } else {
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfa.axis.v1_20.AdvertiserGroupRemote

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.