SlyYTAAPI.analytics#
Functions
|
Classes
From https://developers.google.com/youtube/analytics/v2/reference/reports/query |
|
|
From https://developers.google.com/youtube/analytics/dimensions |
|
From https://developers.google.com/youtube/reporting#metrics |
|
Table of data returned by YouTube Analytics API. |
|
|
|
- class SlyYTAAPI.analytics.Dimensions(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
From https://developers.google.com/youtube/analytics/dimensions
- Day = 'day'#
- Month = 'month'#
- Country = 'country'#
- Video = 'video'#
- class SlyYTAAPI.analytics.Metrics(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
From https://developers.google.com/youtube/reporting#metrics
- Views = 'views'#
- Likes = 'likes'#
- Dislikes = 'dislikes'#
- WatchTime = 'estimatedMinutesWatched'#
- SubsGained = 'subscribersGained'#
- SubsLost = 'subscribersLost'#
- class SlyYTAAPI.analytics.ColumnHeader[source]#
Bases:
TypedDict
From https://developers.google.com/youtube/analytics/v2/reference/reports/query
- class SlyYTAAPI.analytics.QueryResult(kind, columnHeaders, rows)[source]#
Bases:
object
Table of data returned by YouTube Analytics API. From https://developers.google.com/youtube/analytics/v2/reference/reports/query
- Parameters:
- columnHeaders: list[SlyYTAAPI.analytics.ColumnHeader]#
- class SlyYTAAPI.analytics.Scope[source]#
Bases:
object
- Analytics = 'https://www.googleapis.com/auth/yt-analytics.readonly'#
- Monetary = 'https://www.googleapis.com/auth/yt-analytics-monetary.readonly'#
- YouTube = 'https://www.googleapis.com/auth/youtube'#
- YouTubePartner = 'https://www.googleapis.com/auth/youtubepartner'#
- YouTubeReadOnly = 'https://www.googleapis.com/auth/youtube.readonly'#
- class SlyYTAAPI.analytics.YouTubeAnalytics(channel_id, auth_or_app, user=None, _scopes=None)[source]#
Bases:
WebAPI
- Parameters:
channel_id (str) –
auth_or_app (SlyAPI.oauth2.OAuth2 | str) –
user (str | None) –
_scopes (Any | None) –
- DEFAULT_SCOPES = 'https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/youtube.readonly'#
- await video(video_id, since, metrics, dims, end_date=None)[source]#
- Parameters:
video_id (str) –
since (date) –
metrics (SlyYTAAPI.analytics.Metrics | set[SlyYTAAPI.analytics.Metrics]) –
dims (SlyYTAAPI.analytics.Dimensions | set[SlyYTAAPI.analytics.Dimensions]) –
end_date (datetime.date | None) –
- Return type:
- await query(since, metrics, dims, end_date=None, filters=None)[source]#
- Parameters:
since (date) –
metrics (SlyYTAAPI.analytics.Metrics | set[SlyYTAAPI.analytics.Metrics]) –
dims (SlyYTAAPI.analytics.Dimensions | set[SlyYTAAPI.analytics.Dimensions]) –
end_date (datetime.date | None) –
- Return type: