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

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


      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

    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

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

    // Create the creative field.
    CreativeField creativeField = new CreativeField();
    creativeField.setId(-1);
    creativeField.setName(creativeFieldName);
    creativeField.setAdvertiserId(advertiserId);

    // Save the creative field.
    CreativeFieldSaveResult creativeFieldSaveResult = service.saveCreativeField(creativeField);

    // Display the new creative field ID.
View Full Code Here

    CreativeFieldSearchCriteria creativeFieldSearchCriteria = new CreativeFieldSearchCriteria();
    creativeFieldSearchCriteria.setPageSize(10);
    creativeFieldSearchCriteria.setSearchString(searchString);

    // Get creative fields for the selected criteria.
    CreativeFieldRecordSet creativeFields =
        service.getCreativeFields(creativeFieldSearchCriteria);

    // Display creative field names, IDs, advertiser IDs, and number of values.
    if (creativeFields.getRecords() != null) {
      for (CreativeField result : creativeFields.getRecords()) {
        System.out.println("Creative field with name \"" + result.getName()
            + "\", ID \"" + result.getId()
            + "\", Advertiser ID \"" + result.getAdvertiserId()
            + "\", and containing \"" + result.getTotalNumberOfValues()
            + "\" values was found.");
View Full Code Here

  private static final String SEARCH_STRING = "INSERT_SEARCH_CRITERIA_HERE";

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

    // Set up creative field search criteria structure.
    CreativeFieldSearchCriteria creativeFieldSearchCriteria = new CreativeFieldSearchCriteria();
    creativeFieldSearchCriteria.setPageSize(10);
    creativeFieldSearchCriteria.setSearchString(searchString);

    // Get creative fields for the selected criteria.
    CreativeFieldRecordSet creativeFields =
        service.getCreativeFields(creativeFieldSearchCriteria);

    // Display creative field names, IDs, advertiser IDs, and number of values.
    if (creativeFields.getRecords() != null) {
      for (CreativeField result : creativeFields.getRecords()) {
        System.out.println("Creative field with name \"" + result.getName()
View Full Code Here

  public static void runExample(
      DfaServices dfaServices, DfaSession session, String creativeFieldName, long advertiserId)
          throws Exception {
    // Request the service.
    CreativeFieldRemote service = dfaServices.get(session, CreativeFieldRemote.class);

    // Create the creative field.
    CreativeField creativeField = new CreativeField();
    creativeField.setId(-1);
    creativeField.setName(creativeFieldName);
    creativeField.setAdvertiserId(advertiserId);

    // Save the creative field.
    CreativeFieldSaveResult creativeFieldSaveResult = service.saveCreativeField(creativeField);

    // Display the new creative field ID.
    System.out.printf("Creative field with ID \"%s\" was created.%n",
        creativeFieldSaveResult.getId());
  }
View Full Code Here

    creativeField.setId(-1);
    creativeField.setName(creativeFieldName);
    creativeField.setAdvertiserId(advertiserId);

    // Save the creative field.
    CreativeFieldSaveResult creativeFieldSaveResult = service.saveCreativeField(creativeField);

    // Display the new creative field ID.
    System.out.printf("Creative field with ID \"%s\" was created.%n",
        creativeFieldSaveResult.getId());
  }
View Full Code Here

      DfaServices dfaServices, DfaSession session, String searchString) throws Exception {
    // Request the service.
    CreativeFieldRemote service = dfaServices.get(session, CreativeFieldRemote.class);

    // Set up creative field search criteria structure.
    CreativeFieldSearchCriteria creativeFieldSearchCriteria = new CreativeFieldSearchCriteria();
    creativeFieldSearchCriteria.setPageSize(10);
    creativeFieldSearchCriteria.setSearchString(searchString);

    // Get creative fields for the selected criteria.
    CreativeFieldRecordSet creativeFields =
        service.getCreativeFields(creativeFieldSearchCriteria);
View Full Code Here

        new CreativeFieldValueSearchCriteria();
    creativeValueSearchCriteria.setPageSize(10);
    creativeValueSearchCriteria.setSearchString(searchString);

    // Get creative field values for the selected criteria.
    CreativeFieldValueRecordSet creativeFieldValues =
        service.getCreativeFieldValues(creativeValueSearchCriteria);

    // Display creative field value names and IDs.
    if (creativeFieldValues.getRecords() != null) {
      for (CreativeFieldValue result : creativeFieldValues.getRecords()) {
        System.out.println("Creative field value with name \"" + result.getName()
            + "\" and ID \"" + result.getId() + "\" was found.");
      }
    } else {
      System.out.print("No creative field values found for your criteria");
View Full Code Here

TOP

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

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.