Examples of SpotlightRemote


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

*/
public class GetTagMethodTypes {

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

    // Get method types.
    SpotlightTagMethodType[] spotlightTagMethodTypes = service.getSpotlightTagMethodTypes();

    // Display method type names and IDs.
    for (SpotlightTagMethodType result : spotlightTagMethodTypes) {
      System.out.println("Method type with name \"" + result.getName()
          + "\" and ID \"" + result.getId() + "\" was found.");
View Full Code Here

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

  private static final String ACTIVITY_GROUP_ID = "INSERT_ACTIVITY_GROUP_ID_HERE";

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

    // Set spotlight activity structure.
    SpotlightActivity spotActivity = new SpotlightActivity();
    spotActivity.setId(0);
    spotActivity.setName(activityName);
    spotActivity.setActivityGroupId(activityGroupId);
    spotActivity.setExpectedUrl(new URL(url).toString());
    // The type ID for for a counter activity is 1. See GetActivityTypes.java
    spotActivity.setActivityTypeId(1);
    // The standard tag method type has an ID of 1. See GetTagMethodTypes.java
    spotActivity.setTagMethodTypeId(1);

    // Create the spotlight tag activity.
    SpotlightActivitySaveResult spotlightActivityResult =
        service.saveSpotlightActivity(spotActivity);

    // Display new spotlight activity ID.
    if (spotlightActivityResult != null) {
      System.out.printf("Spotlight activity with ID \"%s\" was created.%n",
          spotlightActivityResult.getId());
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.