Examples of NetworkServiceInterface


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

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

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

      // Get the effective root ad unit ID of the network.
      String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

      // Create a statement to select the children of the effective root ad
      // unit.
      Statement filterStatement = new StatementBuilder("WHERE parentId = :id LIMIT 500")
          .putValue("id", effectiveRootAdUnitId).toStatement();
View Full Code Here

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

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

      // Get the NetworkService.
      NetworkServiceInterface networkService =
          user.getService(DfpService.V201211.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.v201211.NetworkServiceInterface

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

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201211.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.v201302.NetworkServiceInterface

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

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

      // Get the effective root ad unit ID of the network.
      String effectiveRootAdUnitId = networkService.getCurrentNetwork().getEffectiveRootAdUnitId();

      // Create a statement to select the children of the effective root ad
      // unit.
      Statement filterStatement = new StatementBuilder("WHERE parentId = :id LIMIT 500")
          .putValue("id", effectiveRootAdUnitId).toStatement();
View Full Code Here

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

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

      // Get the NetworkService.
      NetworkServiceInterface networkService =
          user.getService(DfpService.V201302.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.v201302.NetworkServiceInterface

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

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201302.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.v201302.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.V201302.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.v201302.NetworkServiceInterface

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

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201302.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.v201302.NetworkServiceInterface

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

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201302.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.v201302.NetworkServiceInterface

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

      // Get the NetworkService.
      NetworkServiceInterface networkService = user.getService(DfpService.V201302.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
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.