Copyright | (c) 2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Retrieve your YouTube Analytics reports.
See: YouTube Analytics API Reference for youtubeAnalytics.reports.query
.
- type ReportsQueryResource = "youtube" :> ("analytics" :> ("v1" :> ("reports" :> (QueryParam "ids" Text :> (QueryParam "start-date" Text :> (QueryParam "end-date" Text :> (QueryParam "metrics" Text :> (QueryParam "filters" Text :> (QueryParam "currency" Text :> (QueryParam "sort" Text :> (QueryParam "dimensions" Text :> (QueryParam "start-index" (Textual Int32) :> (QueryParam "max-results" (Textual Int32) :> (QueryParam "alt" AltJSON :> Get `[JSON]` ResultTable))))))))))))))
- reportsQuery :: Text -> Text -> Text -> Text -> ReportsQuery
- data ReportsQuery
- rqMetrics :: Lens' ReportsQuery Text
- rqFilters :: Lens' ReportsQuery (Maybe Text)
- rqIds :: Lens' ReportsQuery Text
- rqEndDate :: Lens' ReportsQuery Text
- rqCurrency :: Lens' ReportsQuery (Maybe Text)
- rqSort :: Lens' ReportsQuery (Maybe Text)
- rqDimensions :: Lens' ReportsQuery (Maybe Text)
- rqStartIndex :: Lens' ReportsQuery (Maybe Int32)
- rqMaxResults :: Lens' ReportsQuery (Maybe Int32)
- rqStartDate :: Lens' ReportsQuery Text
REST Resource
type ReportsQueryResource = "youtube" :> ("analytics" :> ("v1" :> ("reports" :> (QueryParam "ids" Text :> (QueryParam "start-date" Text :> (QueryParam "end-date" Text :> (QueryParam "metrics" Text :> (QueryParam "filters" Text :> (QueryParam "currency" Text :> (QueryParam "sort" Text :> (QueryParam "dimensions" Text :> (QueryParam "start-index" (Textual Int32) :> (QueryParam "max-results" (Textual Int32) :> (QueryParam "alt" AltJSON :> Get `[JSON]` ResultTable)))))))))))))) Source
A resource alias for youtubeAnalytics.reports.query
method which the
ReportsQuery
request conforms to.
Creating a Request
Creates a value of ReportsQuery
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data ReportsQuery Source
Retrieve your YouTube Analytics reports.
See: reportsQuery
smart constructor.
Request Lenses
rqMetrics :: Lens' ReportsQuery Text Source
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.
rqFilters :: Lens' ReportsQuery (Maybe Text) Source
A list of filters that should be applied when retrieving YouTube Analytics data. The Available Reports document identifies the dimensions that can be used to filter each report, and the Dimensions document defines those dimensions. If a request uses multiple filters, join them together with a semicolon (;), and the returned result table will satisfy both filters. For example, a filters parameter value of video==dMH0bHeiRNg;country==IT restricts the result set to include data for the given video in Italy.
rqIds :: Lens' ReportsQuery Text Source
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.
rqEndDate :: Lens' ReportsQuery Text Source
The end date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format.
rqCurrency :: Lens' ReportsQuery (Maybe Text) Source
The currency to which financial metrics should be converted. The default is US Dollar (USD). If the result contains no financial metrics, this flag will be ignored. Responds with an error if the specified currency is not recognized.
rqSort :: Lens' ReportsQuery (Maybe Text) Source
A comma-separated list of dimensions or metrics that determine the sort order for YouTube Analytics data. By default the sort order is ascending. The '-' prefix causes descending sort order.
rqDimensions :: Lens' ReportsQuery (Maybe Text) Source
A comma-separated list of YouTube Analytics dimensions, such as views or ageGroup,gender. See the Available Reports document for a list of the reports that you can retrieve and the dimensions used for those reports. Also see the Dimensions document for definitions of those dimensions.
rqStartIndex :: Lens' ReportsQuery (Maybe Int32) Source
An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter (one-based, inclusive).
rqMaxResults :: Lens' ReportsQuery (Maybe Int32) Source
The maximum number of rows to include in the response.
rqStartDate :: Lens' ReportsQuery Text Source
The start date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format.