Package com.google.gdata.data.analytics

Examples of com.google.gdata.data.analytics.ManagementFeed


   *
   * @param url the URL for the feed being requested.
   * @return The server response in the form of a ManagementFeed object.
   */
  public static ManagementFeed getFeed(String url) {
    ManagementFeed resultFeed = null;
    try {
      URL feedURL = new URL(url);
      resultFeed = analyticsService.getFeed(feedURL, ManagementFeed.class);
    } catch (IOException e) {
      System.err.println("Network error trying to retrieve feed " +
View Full Code Here


   * Retrieves the account feed from the Management API and prints the
   * first entry.
   */
  public static void printFirstAccount() {
    // Get feed
    ManagementFeed accountsFeed = getFeed(BASE_URL + "accounts?max-results=1");   
    // Get Account
    ManagementEntry account = accountsFeed.getEntries().get(0);
    // Print Account
    System.out.println("--- Account Entry ---");
    System.out.println("Account ID: " + account.getProperty("ga:accountId"));
    System.out.println("Account Name: " + account.getProperty("ga:accountName"));
  }
View Full Code Here

  /**
   * Retrieves the web property feed from the Management API and prints the
   * first entry.
   */
  public static void printFirstWebProperty() {
    ManagementFeed webPropertiesFeed = getFeed(BASE_URL +
        "accounts/~all/webproperties?max-results=1");

    ManagementEntry webProperty = webPropertiesFeed.getEntries().get(0);

    System.out.println("--- Web Property Entry ---");   
    System.out.println("Account ID: " + webProperty.getProperty("ga:accountId"));
    System.out.println("Web Property ID: " + webProperty.getProperty("ga:webPropertyId"));
  }
View Full Code Here

  /**
   * Retrieves the profile feed from the Management API and prints the
   * first entry.
   */
  public static void printFirstProfile() {
    ManagementFeed profilesFeed = getFeed(BASE_URL +
        "accounts/~all/webproperties/~all/profiles?max-results=1");

    ManagementEntry profile = profilesFeed.getEntries().get(0);
   
    System.out.println("--- Profile Entry ---");
    System.out.println("Account ID: " + profile.getProperty("ga:accountId"));
    System.out.println("Web Property ID: " + profile.getProperty("ga:webPropertyId"));
    System.out.println("Profile ID: " + profile.getProperty("ga:profileId"));
View Full Code Here

  /**
   * Retrieves the goal feed from the Management API and prints the
   * first entry.
   */
  public static void printFirstGoal() {
    ManagementFeed goalFeed = getFeed(BASE_URL +
        "accounts/~all/webproperties/~all/profiles/~all/goals?max-results=1");
   
    ManagementEntry goalEntry = goalFeed.getEntries().get(0);
    printGoal(goalEntry);
  }
View Full Code Here

  /**
   * Retrieves the goal feed from the Management API and prints the
   * first entry.
   */
  public static void printFirstSegment() {
    ManagementFeed segmentFeed = getFeed(BASE_URL + "segments");
       
    ManagementEntry segmentEntry = segmentFeed.getEntries().get(0);
    Segment segment = segmentEntry.getSegment();   
    System.out.println("--- Segment ---");
    System.out.println("Advanced Segment ID: " + segment.getId());
    System.out.println("Advanced Segment Name: " + segment.getName());
    System.out.println("Advanced Segment Definition: " + segment.getDefinition().getValue());
View Full Code Here

TOP

Related Classes of com.google.gdata.data.analytics.ManagementFeed

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.