target.apidocs.com.google.api.services.analytics.Analytics.Data.Ga.Get.html Maven / Gradle / Ivy
Analytics.Data.Ga.Get (Google Analytics API v3-rev20190807-1.31.0)
com.google.api.services.analytics
Class Analytics.Data.Ga.Get
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.googleapis.services.AbstractGoogleClientRequest<T>
-
- com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest<T>
-
- com.google.api.services.analytics.AnalyticsRequest<GaData>
-
- com.google.api.services.analytics.Analytics.Data.Ga.Get
-
- Enclosing class:
- Analytics.Data.Ga
public class Analytics.Data.Ga.Get
extends AnalyticsRequest<GaData>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Field Summary
-
Fields inherited from class com.google.api.client.googleapis.services.AbstractGoogleClientRequest
USER_AGENT_SUFFIX
-
Constructor Summary
Constructors
Modifier
Constructor and Description
protected
Get(String ids,
String startDate,
String endDate,
String metrics)
Returns Analytics data for a view (profile).
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
HttpRequest
buildHttpRequestUsingHead()
HttpResponse
executeUsingHead()
String
getDimensions()
A comma-separated list of Analytics dimensions.
String
getEndDate()
End date for fetching Analytics data.
String
getFilters()
A comma-separated list of dimension or metric filters to be applied to Analytics data.
String
getIds()
Unique table ID for retrieving Analytics data.
Boolean
getIncludeEmptyRows()
The response will include empty rows if this parameter is set to true, the default is true
Integer
getMaxResults()
The maximum number of entries to include in this feed.
String
getMetrics()
A comma-separated list of Analytics metrics.
String
getOutput()
The selected format for the response.
String
getSamplingLevel()
The desired sampling level.
String
getSegment()
An Analytics segment to be applied to data.
String
getSort()
A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.
String
getStartDate()
Start date for fetching Analytics data.
Integer
getStartIndex()
An index of the first entity to retrieve.
Analytics.Data.Ga.Get
set(String parameterName,
Object value)
Analytics.Data.Ga.Get
setAlt(String alt)
Data format for the response.
Analytics.Data.Ga.Get
setDimensions(String dimensions)
A comma-separated list of Analytics dimensions.
Analytics.Data.Ga.Get
setEndDate(String endDate)
End date for fetching Analytics data.
Analytics.Data.Ga.Get
setFields(String fields)
Selector specifying which fields to include in a partial response.
Analytics.Data.Ga.Get
setFilters(String filters)
A comma-separated list of dimension or metric filters to be applied to Analytics data.
Analytics.Data.Ga.Get
setIds(String ids)
Unique table ID for retrieving Analytics data.
Analytics.Data.Ga.Get
setIncludeEmptyRows(Boolean includeEmptyRows)
The response will include empty rows if this parameter is set to true, the default is
true
Analytics.Data.Ga.Get
setKey(String key)
API key.
Analytics.Data.Ga.Get
setMaxResults(Integer maxResults)
The maximum number of entries to include in this feed.
Analytics.Data.Ga.Get
setMetrics(String metrics)
A comma-separated list of Analytics metrics.
Analytics.Data.Ga.Get
setOauthToken(String oauthToken)
OAuth 2.0 token for the current user.
Analytics.Data.Ga.Get
setOutput(String output)
The selected format for the response.
Analytics.Data.Ga.Get
setPrettyPrint(Boolean prettyPrint)
Returns response with indentations and line breaks.
Analytics.Data.Ga.Get
setQuotaUser(String quotaUser)
An opaque string that represents a user for quota purposes.
Analytics.Data.Ga.Get
setSamplingLevel(String samplingLevel)
The desired sampling level.
Analytics.Data.Ga.Get
setSegment(String segment)
An Analytics segment to be applied to data.
Analytics.Data.Ga.Get
setSort(String sort)
A comma-separated list of dimensions or metrics that determine the sort order for
Analytics data.
Analytics.Data.Ga.Get
setStartDate(String startDate)
Start date for fetching Analytics data.
Analytics.Data.Ga.Get
setStartIndex(Integer startIndex)
An index of the first entity to retrieve.
Analytics.Data.Ga.Get
setUserIp(String userIp)
Deprecated.
-
Methods inherited from class com.google.api.services.analytics.AnalyticsRequest
getAbstractGoogleClient, getAlt, getFields, getKey, getOauthToken, getPrettyPrint, getQuotaUser, getUserIp, setDisableGZipContent, setRequestHeaders
-
Methods inherited from class com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest
getJsonContent, newExceptionOnError, queue
-
Methods inherited from class com.google.api.client.googleapis.services.AbstractGoogleClientRequest
buildHttpRequest, buildHttpRequestUrl, checkRequiredParameter, execute, executeAndDownloadTo, executeAsInputStream, executeMedia, executeMediaAndDownloadTo, executeMediaAsInputStream, executeUnparsed, getDisableGZipContent, getHttpContent, getLastResponseHeaders, getLastStatusCode, getLastStatusMessage, getMediaHttpDownloader, getMediaHttpUploader, getRequestHeaders, getRequestMethod, getResponseClass, getReturnRawInputSteam, getUriTemplate, initializeMediaDownload, initializeMediaUpload, queue, setReturnRawInputStream
-
Methods inherited from class com.google.api.client.util.GenericData
clone, entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys, toString
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Constructor Detail
-
Get
protected Get(String ids,
String startDate,
String endDate,
String metrics)
Returns Analytics data for a view (profile).
Create a request for the method "ga.get".
This request holds the parameters needed by the the analytics server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
Analytics.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)
must be called to initialize this instance immediately after invoking the constructor.
- Parameters:
ids
- Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the
Analytics view (profile) ID.
startDate
- Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD,
or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is
7daysAgo.
endDate
- End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-
DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is
yesterday.
metrics
- A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric
must be specified.
- Since:
- 1.13
-
Method Detail
-
executeUsingHead
public HttpResponse executeUsingHead()
throws IOException
- Overrides:
executeUsingHead
in class AbstractGoogleClientRequest<GaData>
- Throws:
IOException
-
buildHttpRequestUsingHead
public HttpRequest buildHttpRequestUsingHead()
throws IOException
- Overrides:
buildHttpRequestUsingHead
in class AbstractGoogleClientRequest<GaData>
- Throws:
IOException
-
setAlt
public Analytics.Data.Ga.Get setAlt(String alt)
Description copied from class: AnalyticsRequest
Data format for the response.
- Overrides:
setAlt
in class AnalyticsRequest<GaData>
-
setFields
public Analytics.Data.Ga.Get setFields(String fields)
Description copied from class: AnalyticsRequest
Selector specifying which fields to include in a partial response.
- Overrides:
setFields
in class AnalyticsRequest<GaData>
-
setKey
public Analytics.Data.Ga.Get setKey(String key)
Description copied from class: AnalyticsRequest
API key. Your API key identifies your project and provides you with API access, quota, and
reports. Required unless you provide an OAuth 2.0 token.
- Overrides:
setKey
in class AnalyticsRequest<GaData>
-
setOauthToken
public Analytics.Data.Ga.Get setOauthToken(String oauthToken)
Description copied from class: AnalyticsRequest
OAuth 2.0 token for the current user.
- Overrides:
setOauthToken
in class AnalyticsRequest<GaData>
-
setPrettyPrint
public Analytics.Data.Ga.Get setPrettyPrint(Boolean prettyPrint)
Description copied from class: AnalyticsRequest
Returns response with indentations and line breaks.
- Overrides:
setPrettyPrint
in class AnalyticsRequest<GaData>
-
setQuotaUser
public Analytics.Data.Ga.Get setQuotaUser(String quotaUser)
Description copied from class: AnalyticsRequest
An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
- Overrides:
setQuotaUser
in class AnalyticsRequest<GaData>
-
setUserIp
public Analytics.Data.Ga.Get setUserIp(String userIp)
Description copied from class: AnalyticsRequest
Deprecated. Please use quotaUser instead.
- Overrides:
setUserIp
in class AnalyticsRequest<GaData>
-
getIds
public String getIds()
Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the
Analytics view (profile) ID.
-
setIds
public Analytics.Data.Ga.Get setIds(String ids)
Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where
XXXX is the Analytics view (profile) ID.
-
getStartDate
public String getStartDate()
Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD,
or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.
-
setStartDate
public Analytics.Data.Ga.Get setStartDate(String startDate)
Start date for fetching Analytics data. Requests can specify a start date formatted as
YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default
value is 7daysAgo.
-
getEndDate
public String getEndDate()
End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-
DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday.
-
setEndDate
public Analytics.Data.Ga.Get setEndDate(String endDate)
End date for fetching Analytics data. Request can should specify an end date formatted as
YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default
value is yesterday.
-
getMetrics
public String getMetrics()
A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric
must be specified.
-
setMetrics
public Analytics.Data.Ga.Get setMetrics(String metrics)
A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least
one metric must be specified.
-
getDimensions
public String getDimensions()
A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
-
setDimensions
public Analytics.Data.Ga.Get setDimensions(String dimensions)
A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
-
getFilters
public String getFilters()
A comma-separated list of dimension or metric filters to be applied to Analytics data.
-
setFilters
public Analytics.Data.Ga.Get setFilters(String filters)
A comma-separated list of dimension or metric filters to be applied to Analytics data.
-
getIncludeEmptyRows
public Boolean getIncludeEmptyRows()
The response will include empty rows if this parameter is set to true, the default is true
-
setIncludeEmptyRows
public Analytics.Data.Ga.Get setIncludeEmptyRows(Boolean includeEmptyRows)
The response will include empty rows if this parameter is set to true, the default is
true
-
getMaxResults
public Integer getMaxResults()
The maximum number of entries to include in this feed.
-
setMaxResults
public Analytics.Data.Ga.Get setMaxResults(Integer maxResults)
The maximum number of entries to include in this feed.
-
getOutput
public String getOutput()
The selected format for the response. Default format is JSON.
-
setOutput
public Analytics.Data.Ga.Get setOutput(String output)
The selected format for the response. Default format is JSON.
-
getSamplingLevel
public String getSamplingLevel()
The desired sampling level.
-
setSamplingLevel
public Analytics.Data.Ga.Get setSamplingLevel(String samplingLevel)
The desired sampling level.
-
getSegment
public String getSegment()
An Analytics segment to be applied to data.
-
setSegment
public Analytics.Data.Ga.Get setSegment(String segment)
An Analytics segment to be applied to data.
-
getSort
public String getSort()
A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.
-
setSort
public Analytics.Data.Ga.Get setSort(String sort)
A comma-separated list of dimensions or metrics that determine the sort order for
Analytics data.
-
getStartIndex
public Integer getStartIndex()
An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with
the max-results parameter.
[minimum: 1]
-
setStartIndex
public Analytics.Data.Ga.Get setStartIndex(Integer startIndex)
An index of the first entity to retrieve. Use this parameter as a pagination mechanism
along with the max-results parameter.
-
set
public Analytics.Data.Ga.Get set(String parameterName,
Object value)
- Overrides:
set
in class AnalyticsRequest<GaData>
Copyright © 2011–2020 Google. All rights reserved.