query
public YouTubeAnalytics.Reports.Query query(String ids,
String startDate,
String endDate,
String metrics)
throws IOException
Retrieve your YouTube Analytics reports.
Create a request for the method "reports.query".
This request holds the parameters needed by the youtubeAnalytics server. After setting any
optional parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
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.
- Returns:
- the request
- Throws:
IOException