Examples of NetworkServiceInterface


Examples of com.google.api.ads.dfp.v201308.NetworkServiceInterface

      // Get the InventoryService.
      InventoryServiceInterface inventoryService =
          user.getService(DfpService.V201308.INVENTORY_SERVICE);

      // Get the NetworkService.
      NetworkServiceInterface networkService =
          user.getService(DfpService.V201308.NETWORK_SERVICE);

      // Set the parent ad unit's ID for all ad units to be created under.
      String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

      // Create an array to store local ad unit objects.
      AdUnit[] adUnits = new AdUnit[5];

      for (int i = 0; i < 5; i++) {
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.NetworkServiceInterface

      // Get the InventoryService.
      InventoryServiceInterface inventoryService =
          user.getService(DfpService.V201308.INVENTORY_SERVICE);

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201308.NETWORK_SERVICE);

      // Set the parent ad unit's ID for all ad units to be created under.
      String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

      // Create local ad unit object.
      AdUnit adUnit = new AdUnit();
      adUnit.setName("Mobile_Ad_Unit");
      adUnit.setParentId(effectiveRootAdUnitId);
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.NetworkServiceInterface

      // Get the InventoryService.
      InventoryServiceInterface inventoryService =
          user.getService(DfpService.V201308.INVENTORY_SERVICE);

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201308.NETWORK_SERVICE);

      // Set the parent ad unit's ID for all ad units to be created under.
      String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

      // Create local ad unit object.
      AdUnit adUnit = new AdUnit();
      adUnit.setName("Video_Ad_Unit");
      adUnit.setParentId(effectiveRootAdUnitId);
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.NetworkServiceInterface

      // Get DfpUser from "~/dfp.properties". Comment out the networkCode field
      // to retrieve all networks you have access to.
      DfpUser user = new DfpUser();

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201308.NETWORK_SERVICE);

      // Get all networks that you have access to with the current login
      // credentials.
      Network[] networks = networkService.getAllNetworks();

      int i = 0;
      for (Network network : networks) {
        System.out.println(i + ") Network with network code \"" + network.getNetworkCode()
            + "\" and display name \"" + network.getDisplayName() + "\" was found.");
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.NetworkServiceInterface

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201308.NETWORK_SERVICE);

      // Get the current network.
      Network network = networkService.getCurrentNetwork();

      System.out.println("Current network has network code \"" + network.getNetworkCode()
          + "\" and display name \"" + network.getDisplayName() + "\".");
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.NetworkServiceInterface

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201308.NETWORK_SERVICE);

      // Make the test network.
      Network network = networkService.makeTestNetwork();

      System.out.println("Test network with network code \"" + network.getNetworkCode()
          + "\" and display name \"" + network.getDisplayName() + "\" created.\n"
          + "You may now sign in at http://www.google.com/dfp/main?networkCode="
          + network.getNetworkCode());
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.NetworkServiceInterface

      // Get the ContentService.
      ContentServiceInterface contentService = user.getService(DfpService.V201308.CONTENT_SERVICE);

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201308.NETWORK_SERVICE);

      // Get the CustomTargetingService.
      CustomTargetingServiceInterface customTargetingService =
          user.getService(DfpService.V201308.CUSTOM_TARGETING_SERVICE);

      // Get content browse custom targeting key ID.
      long contentBrowseCustomTargetingKeyId =
          networkService.getCurrentNetwork().getContentBrowseCustomTargetingKeyId();

      // Create a statement to select the categories matching the name comedy.
      Statement categoryFilterStatement = new StatementBuilder(
          "WHERE customTargetingKeyId = :contentBrowseCustomTargetingKeyId " +
          " and name = :category LIMIT 1")
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.NetworkServiceInterface

      // Get the ContentService.
      ContentServiceInterface contentService = user.getService(DfpService.V201311.CONTENT_SERVICE);

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201311.NETWORK_SERVICE);

      // Get the CustomTargetingService.
      CustomTargetingServiceInterface customTargetingService =
          user.getService(DfpService.V201311.CUSTOM_TARGETING_SERVICE);

      // Get content browse custom targeting key ID.
      long contentBrowseCustomTargetingKeyId =
          networkService.getCurrentNetwork().getContentBrowseCustomTargetingKeyId();

      // Create a statement to select the categories matching the name comedy.
      Statement categoryFilterStatement = new StatementBuilder(
          "WHERE customTargetingKeyId = :contentBrowseCustomTargetingKeyId " +
          " and name = :category LIMIT 1")
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.NetworkServiceInterface

      // Get DfpUser from "~/dfp.properties". Comment out the networkCode field
      // to retrieve all networks you have access to.
      DfpUser user = new DfpUser();

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201311.NETWORK_SERVICE);

      // Get all networks that you have access to with the current login
      // credentials.
      Network[] networks = networkService.getAllNetworks();

      int i = 0;
      for (Network network : networks) {
        System.out.println(i + ") Network with network code \"" + network.getNetworkCode()
            + "\" and display name \"" + network.getDisplayName() + "\" was found.");
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.NetworkServiceInterface

      // Get DfpUser from "~/dfp.properties".
      DfpUser user = new DfpUser();

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201311.NETWORK_SERVICE);

      // Get the current network.
      Network network = networkService.getCurrentNetwork();

      System.out.println("Current network has network code \"" + network.getNetworkCode()
          + "\" and display name \"" + network.getDisplayName() + "\".");
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.