public class YouTubeAnalytics.Reports.Query extends YouTubeAnalyticsRequest<ResultTable>
com.google.api.client.util.GenericData.Flags
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier | Constructor and Description |
---|---|
protected |
Query(String ids,
String startDate,
String endDate,
String metrics)
Retrieve your YouTube Analytics reports.
|
Modifier and Type | Method and Description |
---|---|
com.google.api.client.http.HttpRequest |
buildHttpRequestUsingHead() |
com.google.api.client.http.HttpResponse |
executeUsingHead() |
String |
getCurrency()
The currency to which financial metrics should be converted.
|
String |
getDimensions()
A comma-separated list of YouTube Analytics dimensions, such as views or ageGroup,gender.
|
String |
getEndDate()
The end date for fetching YouTube Analytics data.
|
String |
getFilters()
A list of filters that should be applied when retrieving YouTube Analytics data.
|
String |
getIds()
Identifies the YouTube channel or content owner for which you are retrieving YouTube Analytics
data.
|
Boolean |
getIncludeHistoricalChannelData()
If set to true historical data (i.e.
|
Integer |
getMaxResults()
The maximum number of rows to include in the response.
|
String |
getMetrics()
A comma-separated list of YouTube Analytics metrics, such as views or likes,dislikes.
|
String |
getSort()
A comma-separated list of dimensions or metrics that determine the sort order for YouTube Analytics
data.
|
String |
getStartDate()
The start date for fetching YouTube Analytics data.
|
Integer |
getStartIndex()
An index of the first entity to retrieve.
|
YouTubeAnalytics.Reports.Query |
set(String parameterName,
Object value) |
YouTubeAnalytics.Reports.Query |
setAlt(String alt)
Data format for the response.
|
YouTubeAnalytics.Reports.Query |
setCurrency(String currency)
The currency to which financial metrics should be converted.
|
YouTubeAnalytics.Reports.Query |
setDimensions(String dimensions)
A comma-separated list of YouTube Analytics dimensions, such as views or ageGroup,gender.
|
YouTubeAnalytics.Reports.Query |
setEndDate(String endDate)
The end date for fetching YouTube Analytics data.
|
YouTubeAnalytics.Reports.Query |
setFields(String fields)
Selector specifying which fields to include in a partial response.
|
YouTubeAnalytics.Reports.Query |
setFilters(String filters)
A list of filters that should be applied when retrieving YouTube Analytics data.
|
YouTubeAnalytics.Reports.Query |
setIds(String ids)
Identifies the YouTube channel or content owner for which you are retrieving YouTube
Analytics data.
|
YouTubeAnalytics.Reports.Query |
setIncludeHistoricalChannelData(Boolean includeHistoricalChannelData)
If set to true historical data (i.e.
|
YouTubeAnalytics.Reports.Query |
setKey(String key)
API key.
|
YouTubeAnalytics.Reports.Query |
setMaxResults(Integer maxResults)
The maximum number of rows to include in the response.
|
YouTubeAnalytics.Reports.Query |
setMetrics(String metrics)
A comma-separated list of YouTube Analytics metrics, such as views or likes,dislikes.
|
YouTubeAnalytics.Reports.Query |
setOauthToken(String oauthToken)
OAuth 2.0 token for the current user.
|
YouTubeAnalytics.Reports.Query |
setPrettyPrint(Boolean prettyPrint)
Returns response with indentations and line breaks.
|
YouTubeAnalytics.Reports.Query |
setQuotaUser(String quotaUser)
An opaque string that represents a user for quota purposes.
|
YouTubeAnalytics.Reports.Query |
setSort(String sort)
A comma-separated list of dimensions or metrics that determine the sort order for YouTube
Analytics data.
|
YouTubeAnalytics.Reports.Query |
setStartDate(String startDate)
The start date for fetching YouTube Analytics data.
|
YouTubeAnalytics.Reports.Query |
setStartIndex(Integer startIndex)
An index of the first entity to retrieve.
|
YouTubeAnalytics.Reports.Query |
setUserIp(String userIp)
Deprecated.
|
getAbstractGoogleClient, getAlt, getFields, getKey, getOauthToken, getPrettyPrint, getQuotaUser, getUserIp, setDisableGZipContent, setRequestHeaders
getJsonContent, newExceptionOnError, queue
buildHttpRequest, buildHttpRequestUrl, checkRequiredParameter, execute, executeAndDownloadTo, executeAsInputStream, executeMedia, executeMediaAndDownloadTo, executeMediaAsInputStream, executeUnparsed, getDisableGZipContent, getHttpContent, getLastResponseHeaders, getLastStatusCode, getLastStatusMessage, getMediaHttpDownloader, getMediaHttpUploader, getRequestHeaders, getRequestMethod, getResponseClass, getUriTemplate, initializeMediaDownload, initializeMediaUpload, queue
clone, entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
protected Query(String ids, String startDate, String endDate, String metrics)
AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
YouTubeAnalytics.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)
must
be called to initialize this instance immediately after invoking the constructor.
ids
- Identifies the YouTube channel or content owner for which you are retrieving YouTube Analytics data.
- To request data for a YouTube user, set the ids parameter value to channel==CHANNEL_ID,
where CHANNEL_ID specifies the unique YouTube channel ID.
- To request data for a YouTube
CMS content owner, set the ids parameter value to contentOwner==OWNER_NAME, where
OWNER_NAME is the CMS name of the content owner.startDate
- The start date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format.endDate
- The end date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format.metrics
- A comma-separated list of YouTube Analytics metrics, such as views or likes,dislikes. See the
Available Reports document for a list of the reports that you can retrieve and the metrics
available in each report, and see the Metrics document for definitions of those metrics.public com.google.api.client.http.HttpResponse executeUsingHead() throws IOException
executeUsingHead
in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<ResultTable>
IOException
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws IOException
buildHttpRequestUsingHead
in class com.google.api.client.googleapis.services.AbstractGoogleClientRequest<ResultTable>
IOException
public YouTubeAnalytics.Reports.Query setAlt(String alt)
YouTubeAnalyticsRequest
setAlt
in class YouTubeAnalyticsRequest<ResultTable>
public YouTubeAnalytics.Reports.Query setFields(String fields)
YouTubeAnalyticsRequest
setFields
in class YouTubeAnalyticsRequest<ResultTable>
public YouTubeAnalytics.Reports.Query setKey(String key)
YouTubeAnalyticsRequest
setKey
in class YouTubeAnalyticsRequest<ResultTable>
public YouTubeAnalytics.Reports.Query setOauthToken(String oauthToken)
YouTubeAnalyticsRequest
setOauthToken
in class YouTubeAnalyticsRequest<ResultTable>
public YouTubeAnalytics.Reports.Query setPrettyPrint(Boolean prettyPrint)
YouTubeAnalyticsRequest
setPrettyPrint
in class YouTubeAnalyticsRequest<ResultTable>
public YouTubeAnalytics.Reports.Query setQuotaUser(String quotaUser)
YouTubeAnalyticsRequest
setQuotaUser
in class YouTubeAnalyticsRequest<ResultTable>
public YouTubeAnalytics.Reports.Query setUserIp(String userIp)
YouTubeAnalyticsRequest
setUserIp
in class YouTubeAnalyticsRequest<ResultTable>
public String getIds()
public YouTubeAnalytics.Reports.Query setIds(String ids)
public String getStartDate()
public YouTubeAnalytics.Reports.Query setStartDate(String startDate)
public String getEndDate()
public YouTubeAnalytics.Reports.Query setEndDate(String endDate)
public String getMetrics()
public YouTubeAnalytics.Reports.Query setMetrics(String metrics)
public String getCurrency()
public YouTubeAnalytics.Reports.Query setCurrency(String currency)
public String getDimensions()
public YouTubeAnalytics.Reports.Query setDimensions(String dimensions)
public String getFilters()
public YouTubeAnalytics.Reports.Query setFilters(String filters)
public Boolean getIncludeHistoricalChannelData()
public YouTubeAnalytics.Reports.Query setIncludeHistoricalChannelData(Boolean includeHistoricalChannelData)
public Integer getMaxResults()
public YouTubeAnalytics.Reports.Query setMaxResults(Integer maxResults)
public String getSort()
public YouTubeAnalytics.Reports.Query setSort(String sort)
public Integer getStartIndex()
public YouTubeAnalytics.Reports.Query setStartIndex(Integer startIndex)
public YouTubeAnalytics.Reports.Query set(String parameterName, Object value)
set
in class YouTubeAnalyticsRequest<ResultTable>
Copyright © 2011–2019 Google. All rights reserved.