Google Analytics API . management . segments

Instance Methods

list(max_results=None, start_index=None)

Lists segments to which the user has access.

Method Details

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.
    "username": "A String", # Email ID of the authenticated user
    "kind": "analytics#segments", # Collection type for segments.
    "items": [ # A list of segments.
      { # JSON template for an Analytics segment.
        "definition": "A String", # Segment definition.
        "updated": "A String", # Time the segment was last modified.
        "name": "A String", # Segment name.
        "created": "A String", # Time the segment was created.
        "kind": "analytics#segment", # Resource type for Analytics segment.
        "type": "A String", # Type for a segment. Possible values are "BUILT_IN" or "CUSTOM".
        "id": "A String", # Segment ID.
        "selfLink": "A String", # Link for this segment.
        "segmentId": "A String", # Segment ID. Can be used with the 'segment' parameter in Core Reporting API.
      },
    ],
    "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.
    "nextLink": "A String", # Link to next 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.
    "previousLink": "A String", # Link to previous page for this segment collection.
    "totalResults": 42, # The total number of results for the query, regardless of the number of results in the response.
  }