Google Analytics API . management . segments

Instance Methods

close()

Close httplib2 connections.

list(max_results=None, start_index=None)

Lists segments to which the user has access.

Method Details

close()
Close httplib2 connections.
list(max_results=None, start_index=None)
Lists segments to which the user has access.

Args:
  max_results: integer, The maximum number of segments to include in this response.
  start_index: integer, An index of the first segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.

Returns:
  An object of the form:

    { # An segment collection lists Analytics segments that the user has access to. Each resource in the collection corresponds to a single Analytics segment.
  "items": [ # A list of segments.
    { # JSON template for an Analytics segment.
      "created": "A String", # Time the segment was created.
      "definition": "A String", # Segment definition.
      "id": "A String", # Segment ID.
      "kind": "analytics#segment", # Resource type for Analytics segment.
      "name": "A String", # Segment name.
      "segmentId": "A String", # Segment ID. Can be used with the 'segment' parameter in Core Reporting API.
      "selfLink": "A String", # Link for this segment.
      "type": "A String", # Type for a segment. Possible values are "BUILT_IN" or "CUSTOM".
      "updated": "A String", # Time the segment was last modified.
    },
  ],
  "itemsPerPage": 42, # The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.
  "kind": "analytics#segments", # Collection type for segments.
  "nextLink": "A String", # Link to next page for this segment collection.
  "previousLink": "A String", # Link to previous page for this segment collection.
  "startIndex": 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter.
  "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response.
  "username": "A String", # Email ID of the authenticated user
}