Copyright | (c) 2015-2016 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 |
Retrieves your YouTube Analytics data.
Synopsis
- youTubeAnalyticsService :: ServiceConfig
- youTubeScope :: Proxy '["https://www.googleapis.com/auth/youtube"]
- youTubeAnalyticsReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/yt-analytics.readonly"]
- youTubePartnerScope :: Proxy '["https://www.googleapis.com/auth/youtubepartner"]
- youTubeAnalyticsMonetaryReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/yt-analytics-monetary.readonly"]
- youTubeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/youtube.readonly"]
- type YouTubeAnalyticsAPI = GroupsInsertResource :<|> (GroupsListResource :<|> (GroupsDeleteResource :<|> (GroupsUpdateResource :<|> (ReportsQueryResource :<|> (GroupItemsInsertResource :<|> (GroupItemsListResource :<|> GroupItemsDeleteResource))))))
- module Network.Google.Resource.YouTubeAnalytics.GroupItems.Delete
- module Network.Google.Resource.YouTubeAnalytics.GroupItems.Insert
- module Network.Google.Resource.YouTubeAnalytics.GroupItems.List
- module Network.Google.Resource.YouTubeAnalytics.Groups.Delete
- module Network.Google.Resource.YouTubeAnalytics.Groups.Insert
- module Network.Google.Resource.YouTubeAnalytics.Groups.List
- module Network.Google.Resource.YouTubeAnalytics.Groups.Update
- module Network.Google.Resource.YouTubeAnalytics.Reports.Query
- data GroupContentDetails
- groupContentDetails :: GroupContentDetails
- gcdItemType :: Lens' GroupContentDetails (Maybe Text)
- gcdItemCount :: Lens' GroupContentDetails (Maybe Word64)
- data Group
- group' :: Group
- gEtag :: Lens' Group (Maybe Text)
- gSnippet :: Lens' Group (Maybe GroupSnippet)
- gKind :: Lens' Group (Maybe Text)
- gContentDetails :: Lens' Group (Maybe GroupContentDetails)
- gId :: Lens' Group (Maybe Text)
- gErrors :: Lens' Group (Maybe Errors)
- data ListGroupsResponse
- listGroupsResponse :: ListGroupsResponse
- lgrEtag :: Lens' ListGroupsResponse (Maybe Text)
- lgrNextPageToken :: Lens' ListGroupsResponse (Maybe Text)
- lgrKind :: Lens' ListGroupsResponse (Maybe Text)
- lgrItems :: Lens' ListGroupsResponse [Group]
- lgrErrors :: Lens' ListGroupsResponse (Maybe Errors)
- data ListGroupItemsResponse
- listGroupItemsResponse :: ListGroupItemsResponse
- lgirEtag :: Lens' ListGroupItemsResponse (Maybe Text)
- lgirKind :: Lens' ListGroupItemsResponse (Maybe Text)
- lgirItems :: Lens' ListGroupItemsResponse [GroupItem]
- lgirErrors :: Lens' ListGroupItemsResponse (Maybe Errors)
- data GroupItemResource
- groupItemResource :: GroupItemResource
- girKind :: Lens' GroupItemResource (Maybe Text)
- girId :: Lens' GroupItemResource (Maybe Text)
- data Xgafv
- data GroupSnippet
- groupSnippet :: GroupSnippet
- gsPublishedAt :: Lens' GroupSnippet (Maybe UTCTime)
- gsTitle :: Lens' GroupSnippet (Maybe Text)
- data GroupItem
- groupItem :: GroupItem
- giEtag :: Lens' GroupItem (Maybe Text)
- giKind :: Lens' GroupItem (Maybe Text)
- giResource :: Lens' GroupItem (Maybe GroupItemResource)
- giGroupId :: Lens' GroupItem (Maybe Text)
- giId :: Lens' GroupItem (Maybe Text)
- giErrors :: Lens' GroupItem (Maybe Errors)
- data Errors
- errors :: Errors
- eRequestId :: Lens' Errors (Maybe Text)
- eError :: Lens' Errors [ErrorProto]
- eCode :: Lens' Errors (Maybe ErrorsCode)
- data ErrorProtoLocationType
- data ErrorsCode
- data ResultTableColumnHeader
- resultTableColumnHeader :: ResultTableColumnHeader
- rtchColumnType :: Lens' ResultTableColumnHeader (Maybe Text)
- rtchName :: Lens' ResultTableColumnHeader (Maybe Text)
- rtchDataType :: Lens' ResultTableColumnHeader (Maybe Text)
- data ErrorProto
- errorProto :: ErrorProto
- epDebugInfo :: Lens' ErrorProto (Maybe Text)
- epLocation :: Lens' ErrorProto (Maybe Text)
- epDomain :: Lens' ErrorProto (Maybe Text)
- epArgument :: Lens' ErrorProto [Text]
- epExternalErrorMessage :: Lens' ErrorProto (Maybe Text)
- epCode :: Lens' ErrorProto (Maybe Text)
- epLocationType :: Lens' ErrorProto (Maybe ErrorProtoLocationType)
- data EmptyResponse
- emptyResponse :: EmptyResponse
- erErrors :: Lens' EmptyResponse (Maybe Errors)
- data QueryResponse
- queryResponse :: QueryResponse
- qrKind :: Lens' QueryResponse (Maybe Text)
- qrRows :: Lens' QueryResponse [[JSONValue]]
- qrColumnHeaders :: Lens' QueryResponse [ResultTableColumnHeader]
- qrErrors :: Lens' QueryResponse (Maybe Errors)
Service Configuration
youTubeAnalyticsService :: ServiceConfig Source #
Default request referring to version v2
of the YouTube Analytics API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
youTubeScope :: Proxy '["https://www.googleapis.com/auth/youtube"] Source #
Manage your YouTube account
youTubeAnalyticsReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/yt-analytics.readonly"] Source #
View YouTube Analytics reports for your YouTube content
youTubePartnerScope :: Proxy '["https://www.googleapis.com/auth/youtubepartner"] Source #
View and manage your assets and associated content on YouTube
youTubeAnalyticsMonetaryReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/yt-analytics-monetary.readonly"] Source #
View monetary and non-monetary YouTube Analytics reports for your YouTube content
youTubeReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/youtube.readonly"] Source #
View your YouTube account
API Declaration
type YouTubeAnalyticsAPI = GroupsInsertResource :<|> (GroupsListResource :<|> (GroupsDeleteResource :<|> (GroupsUpdateResource :<|> (ReportsQueryResource :<|> (GroupItemsInsertResource :<|> (GroupItemsListResource :<|> GroupItemsDeleteResource)))))) Source #
Represents the entirety of the methods and resources available for the YouTube Analytics API service.
Resources
youtubeAnalytics.groupItems.delete
youtubeAnalytics.groupItems.insert
youtubeAnalytics.groupItems.list
youtubeAnalytics.groups.delete
youtubeAnalytics.groups.insert
youtubeAnalytics.groups.list
youtubeAnalytics.groups.update
youtubeAnalytics.reports.query
Types
GroupContentDetails
data GroupContentDetails Source #
A group's content details.
See: groupContentDetails
smart constructor.
Instances
groupContentDetails :: GroupContentDetails Source #
Creates a value of GroupContentDetails
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gcdItemCount :: Lens' GroupContentDetails (Maybe Word64) Source #
The number of items in the group.
Group
A group.
See: group'
smart constructor.
Instances
Eq Group Source # | |
Data Group Source # | |
Defined in Network.Google.YouTubeAnalytics.Types.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Group -> c Group # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Group # dataTypeOf :: Group -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Group) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Group) # gmapT :: (forall b. Data b => b -> b) -> Group -> Group # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Group -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Group -> r # gmapQ :: (forall d. Data d => d -> u) -> Group -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Group -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Group -> m Group # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Group -> m Group # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Group -> m Group # | |
Show Group Source # | |
Generic Group Source # | |
ToJSON Group Source # | |
FromJSON Group Source # | |
type Rep Group Source # | |
Defined in Network.Google.YouTubeAnalytics.Types.Product type Rep Group = D1 (MetaData "Group" "Network.Google.YouTubeAnalytics.Types.Product" "gogol-youtube-analytics-0.4.0-IrfU7WJzyla4uJR5p2EXts" False) (C1 (MetaCons "Group'" PrefixI True) ((S1 (MetaSel (Just "_gEtag") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_gSnippet") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe GroupSnippet)) :*: S1 (MetaSel (Just "_gKind") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_gContentDetails") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe GroupContentDetails)) :*: (S1 (MetaSel (Just "_gId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_gErrors") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Errors)))))) |
gSnippet :: Lens' Group (Maybe GroupSnippet) Source #
The `snippet` object contains basic information about the group, including its creation date and name.
gKind :: Lens' Group (Maybe Text) Source #
Identifies the API resource's type. The value will be `youtube#group`.
gContentDetails :: Lens' Group (Maybe GroupContentDetails) Source #
The `contentDetails` object contains additional information about the group, such as the number and type of items that it contains.
ListGroupsResponse
data ListGroupsResponse Source #
Response message for GroupsService.ListGroups.
See: listGroupsResponse
smart constructor.
Instances
listGroupsResponse :: ListGroupsResponse Source #
Creates a value of ListGroupsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lgrNextPageToken :: Lens' ListGroupsResponse (Maybe Text) Source #
The token that can be used as the value of the `pageToken` parameter to retrieve the next page in the result set.
lgrKind :: Lens' ListGroupsResponse (Maybe Text) Source #
Identifies the API resource's type. The value will be `youtube#groupListResponse`.
lgrItems :: Lens' ListGroupsResponse [Group] Source #
A list of groups that match the API request parameters. Each item in the list represents a `group` resource.
ListGroupItemsResponse
data ListGroupItemsResponse Source #
Response message for GroupsService.ListGroupItems.
See: listGroupItemsResponse
smart constructor.
Instances
listGroupItemsResponse :: ListGroupItemsResponse Source #
Creates a value of ListGroupItemsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lgirKind :: Lens' ListGroupItemsResponse (Maybe Text) Source #
Identifies the API resource's type. The value will be `youtube#groupItemListResponse`.
lgirItems :: Lens' ListGroupItemsResponse [GroupItem] Source #
A list of groups that match the API request parameters. Each item in the list represents a `groupItem` resource.
lgirErrors :: Lens' ListGroupItemsResponse (Maybe Errors) Source #
Apiary error details
GroupItemResource
data GroupItemResource Source #
Instances
groupItemResource :: GroupItemResource Source #
Creates a value of GroupItemResource
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
girId :: Lens' GroupItemResource (Maybe Text) Source #
The channel, video, playlist, or asset ID that YouTube uses to uniquely identify the item that is being added to the group.
Xgafv
V1 error format.
Instances
GroupSnippet
data GroupSnippet Source #
A group snippet.
See: groupSnippet
smart constructor.
Instances
groupSnippet :: GroupSnippet Source #
Creates a value of GroupSnippet
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gsPublishedAt :: Lens' GroupSnippet (Maybe UTCTime) Source #
The date and time that the group was created. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
gsTitle :: Lens' GroupSnippet (Maybe Text) Source #
The group name. The value must be a non-empty string.
GroupItem
A group item.
See: groupItem
smart constructor.
Instances
giKind :: Lens' GroupItem (Maybe Text) Source #
Identifies the API resource's type. The value will be `youtube#groupItem`.
giResource :: Lens' GroupItem (Maybe GroupItemResource) Source #
The `resource` object contains information that identifies the item being added to the group.
giGroupId :: Lens' GroupItem (Maybe Text) Source #
The ID that YouTube uses to uniquely identify the group that contains the item.
giId :: Lens' GroupItem (Maybe Text) Source #
The ID that YouTube uses to uniquely identify the `channel`, `video`, `playlist`, or `asset` resource that is included in the group. Note that this ID refers specifically to the inclusion of that resource in a particular group and is different than the channel ID, video ID, playlist ID, or asset ID that uniquely identifies the resource itself. The `resource.id` property's value specifies the unique channel, video, playlist, or asset ID.
Errors
Request Error information. The presence of an error field signals that the operation has failed.
See: errors
smart constructor.
Instances
Eq Errors Source # | |
Data Errors Source # | |
Defined in Network.Google.YouTubeAnalytics.Types.Product gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Errors -> c Errors # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Errors # toConstr :: Errors -> Constr # dataTypeOf :: Errors -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Errors) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Errors) # gmapT :: (forall b. Data b => b -> b) -> Errors -> Errors # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Errors -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Errors -> r # gmapQ :: (forall d. Data d => d -> u) -> Errors -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Errors -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Errors -> m Errors # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Errors -> m Errors # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Errors -> m Errors # | |
Show Errors Source # | |
Generic Errors Source # | |
ToJSON Errors Source # | |
FromJSON Errors Source # | |
type Rep Errors Source # | |
Defined in Network.Google.YouTubeAnalytics.Types.Product type Rep Errors = D1 (MetaData "Errors" "Network.Google.YouTubeAnalytics.Types.Product" "gogol-youtube-analytics-0.4.0-IrfU7WJzyla4uJR5p2EXts" False) (C1 (MetaCons "Errors'" PrefixI True) (S1 (MetaSel (Just "_eRequestId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_eError") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [ErrorProto])) :*: S1 (MetaSel (Just "_eCode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ErrorsCode))))) |
Creates a value of Errors
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
eRequestId :: Lens' Errors (Maybe Text) Source #
Request identifier generated by the service, which can be used to identify the error in the logs
eCode :: Lens' Errors (Maybe ErrorsCode) Source #
Global error code. Deprecated and ignored. Set custom error codes in ErrorProto.domain and ErrorProto.code instead.
ErrorProtoLocationType
data ErrorProtoLocationType Source #
Path |
|
Other |
|
Instances
ErrorsCode
data ErrorsCode Source #
Global error code. Deprecated and ignored. Set custom error codes in ErrorProto.domain and ErrorProto.code instead.
BadRequest | BAD_REQUEST |
ForBidden | FORBIDDEN |
NotFound | NOT_FOUND |
Conflict | CONFLICT |
Gone | GONE |
PreconditionFailed | PRECONDITION_FAILED |
InternalError | INTERNAL_ERROR |
ServiceUnavailable | SERVICE_UNAVAILABLE |
Instances
ResultTableColumnHeader
data ResultTableColumnHeader Source #
The description of a column of the result table.
See: resultTableColumnHeader
smart constructor.
Instances
resultTableColumnHeader :: ResultTableColumnHeader Source #
Creates a value of ResultTableColumnHeader
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
rtchColumnType :: Lens' ResultTableColumnHeader (Maybe Text) Source #
The type of the column (`DIMENSION` or `METRIC`).
rtchDataType :: Lens' ResultTableColumnHeader (Maybe Text) Source #
The type of the data in the column (`STRING`, `INTEGER`, `FLOAT`, etc.).
ErrorProto
data ErrorProto Source #
Describes one specific error.
See: errorProto
smart constructor.
Instances
errorProto :: ErrorProto Source #
Creates a value of ErrorProto
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
epDebugInfo :: Lens' ErrorProto (Maybe Text) Source #
Debugging information, which should not be shared externally.
epLocation :: Lens' ErrorProto (Maybe Text) Source #
Location of the error, as specified by the location type. If location_type is PATH, this should be a path to a field that's relative to the request, using FieldPath notation (net/proto2/util/public/field_path.h). Examples: authenticated_user.gaia_id resource.address[2].country
epDomain :: Lens' ErrorProto (Maybe Text) Source #
Error domain. RoSy services can define their own domain and error codes. This should normally be the name of an enum type, such as: gdata.CoreErrorDomain
epArgument :: Lens' ErrorProto [Text] Source #
Error arguments, to be used when building user-friendly error messages given the error domain and code. Different error codes require different arguments.
epExternalErrorMessage :: Lens' ErrorProto (Maybe Text) Source #
A short explanation for the error, which can be shared outside Google. Please set domain, code and arguments whenever possible instead of this error message so that external APIs can build safe error messages themselves. External messages built in a RoSy interface will most likely refer to information and concepts that are not available externally and should not be exposed. It is safer if external APIs can understand the errors and decide what the error message should look like.
epCode :: Lens' ErrorProto (Maybe Text) Source #
Error code in the error domain. This should correspond to a value of the enum type whose name is in domain. See the core error domain in error_domain.proto.
EmptyResponse
data EmptyResponse Source #
Empty response.
See: emptyResponse
smart constructor.
Instances
emptyResponse :: EmptyResponse Source #
Creates a value of EmptyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
QueryResponse
data QueryResponse Source #
Response message for TargetedQueriesService.Query.
See: queryResponse
smart constructor.
Instances
queryResponse :: QueryResponse Source #
Creates a value of QueryResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
qrKind :: Lens' QueryResponse (Maybe Text) Source #
This value specifies the type of data included in the API response. For the query method, the kind property value will be `youtubeAnalytics#resultTable`.
qrRows :: Lens' QueryResponse [[JSONValue]] Source #
The list contains all rows of the result table. Each item in the list is an array that contains comma-delimited data corresponding to a single row of data. The order of the comma-delimited data fields will match the order of the columns listed in the `columnHeaders` field. If no data is available for the given query, the `rows` element will be omitted from the response. The response for a query with the `day` dimension will not contain rows for the most recent days.
qrColumnHeaders :: Lens' QueryResponse [ResultTableColumnHeader] Source #
This value specifies information about the data returned in the `rows` fields. Each item in the `columnHeaders` list identifies a field returned in the `rows` value, which contains a list of comma-delimited data. The `columnHeaders` list will begin with the dimensions specified in the API request, which will be followed by the metrics specified in the API request. The order of both dimensions and metrics will match the ordering in the API request. For example, if the API request contains the parameters `dimensions=ageGroup,gender&metrics=viewerPercentage`, the API response will return columns in this order: `ageGroup`, `gender`, `viewerPercentage`.