yt 0.25.13 → 0.32.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +305 -1
- data/MIT-LICENSE +1 -1
- data/README.md +86 -5
- data/YOUTUBE_IT.md +3 -3
- data/lib/yt.rb +5 -2
- data/lib/yt/actions/list.rb +3 -3
- data/lib/yt/associations/has_authentication.rb +33 -1
- data/lib/yt/associations/has_reports.rb +13 -18
- data/lib/yt/collections/assets.rb +2 -2
- data/lib/yt/collections/authentications.rb +9 -2
- data/lib/yt/collections/base.rb +3 -3
- data/lib/yt/collections/bulk_report_jobs.rb +28 -0
- data/lib/yt/collections/bulk_reports.rb +24 -0
- data/lib/yt/collections/claims.rb +22 -1
- data/lib/yt/collections/comment_threads.rb +41 -0
- data/lib/yt/collections/content_owners.rb +1 -1
- data/lib/yt/collections/group_infos.rb +27 -0
- data/lib/yt/collections/group_items.rb +45 -0
- data/lib/yt/collections/reports.rb +75 -13
- data/lib/yt/collections/revocations.rb +30 -0
- data/lib/yt/collections/video_groups.rb +29 -0
- data/lib/yt/collections/videos.rb +34 -9
- data/lib/yt/constants/geography.rb +326 -0
- data/lib/yt/errors/forbidden.rb +1 -3
- data/lib/yt/errors/no_items.rb +1 -3
- data/lib/yt/errors/request_error.rb +10 -7
- data/lib/yt/errors/server_error.rb +1 -3
- data/lib/yt/errors/unauthorized.rb +3 -3
- data/lib/yt/models/account.rb +12 -0
- data/lib/yt/models/advertising_options_set.rb +4 -4
- data/lib/yt/models/bulk_report.rb +23 -0
- data/lib/yt/models/bulk_report_job.rb +23 -0
- data/lib/yt/models/channel.rb +21 -12
- data/lib/yt/models/claim.rb +13 -2
- data/lib/yt/models/comment.rb +37 -0
- data/lib/yt/models/comment_thread.rb +50 -0
- data/lib/yt/models/content_detail.rb +6 -0
- data/lib/yt/models/content_owner.rb +31 -1
- data/lib/yt/models/group_info.rb +16 -0
- data/lib/yt/models/group_item.rb +15 -0
- data/lib/yt/models/resource.rb +3 -10
- data/lib/yt/models/revocation.rb +12 -0
- data/lib/yt/models/right_owner.rb +0 -2
- data/lib/yt/models/snippet.rb +24 -3
- data/lib/yt/models/video.rb +42 -11
- data/lib/yt/models/video_group.rb +186 -0
- data/lib/yt/request.rb +5 -3
- data/lib/yt/version.rb +2 -2
- data/spec/collections/comment_threads_spec.rb +46 -0
- data/spec/collections/playlist_items_spec.rb +1 -1
- data/spec/collections/reports_spec.rb +2 -2
- data/spec/constants/geography_spec.rb +16 -0
- data/spec/models/annotation_spec.rb +1 -1
- data/spec/models/claim_spec.rb +15 -3
- data/spec/models/comment_spec.rb +40 -0
- data/spec/models/comment_thread_spec.rb +93 -0
- data/spec/models/content_detail_spec.rb +7 -0
- data/spec/models/reference_spec.rb +2 -2
- data/spec/models/request_spec.rb +21 -0
- data/spec/models/resource_spec.rb +0 -15
- data/spec/models/video_spec.rb +1 -1
- data/spec/requests/as_account/account_spec.rb +16 -4
- data/spec/requests/as_account/authentications_spec.rb +1 -13
- data/spec/requests/as_account/channel_spec.rb +15 -45
- data/spec/requests/as_account/playlist_item_spec.rb +3 -3
- data/spec/requests/as_account/playlist_spec.rb +5 -32
- data/spec/requests/as_account/video_spec.rb +2022 -21
- data/spec/requests/as_content_owner/account_spec.rb +4 -0
- data/spec/requests/as_content_owner/bulk_report_job_spec.rb +19 -0
- data/spec/requests/as_content_owner/channel_spec.rb +59 -270
- data/spec/requests/as_content_owner/content_owner_spec.rb +89 -1
- data/spec/requests/as_content_owner/playlist_spec.rb +0 -15
- data/spec/requests/as_content_owner/video_group_spec.rb +112 -0
- data/spec/requests/as_content_owner/video_spec.rb +72 -146
- data/spec/requests/as_server_app/channel_spec.rb +1 -21
- data/spec/requests/as_server_app/comment_spec.rb +22 -0
- data/spec/requests/as_server_app/comment_thread_spec.rb +27 -0
- data/spec/requests/as_server_app/comment_threads_spec.rb +41 -0
- data/spec/requests/as_server_app/playlist_item_spec.rb +2 -2
- data/spec/requests/as_server_app/playlist_spec.rb +1 -22
- data/spec/requests/as_server_app/video_spec.rb +21 -19
- data/spec/requests/as_server_app/videos_spec.rb +5 -5
- data/spec/requests/unauthenticated/video_spec.rb +1 -9
- data/spec/spec_helper.rb +1 -1
- data/yt.gemspec +2 -1
- metadata +51 -17
- data/lib/yt/collections/ids.rb +0 -27
- data/lib/yt/config.rb +0 -54
- data/lib/yt/models/configuration.rb +0 -70
- data/lib/yt/models/description.rb +0 -58
- data/lib/yt/models/url.rb +0 -91
- data/spec/models/configuration_spec.rb +0 -44
- data/spec/models/description_spec.rb +0 -94
- data/spec/models/url_spec.rb +0 -84
- data/spec/requests/as_account/resource_spec.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 42cfba8fbb240b3272678d965ba64987563a9a2a2a8ae839a22df6a764722ae3
|
4
|
+
data.tar.gz: e81d7bb9c2cd64ae4fdc9d68dae7a39ae7ff2b0f3ffea3dc27a52103f8a21ec7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2cbb015d4d363ca40d9238bffabd618edc534f250097ab58548a2f2676334a419dfe8cac893b282063fe03373a1b71f055f90f972d2489ce6e69e81237727f7
|
7
|
+
data.tar.gz: e0bb039d9acfbfb4d2403ffbad549dba4fa359ab9467a6faeed1ff6fe6137adf5dd8c307dbb025f8e4e7a8dc4cb3204a9ef78aff1ca8cfb77fc44ea4197b9fd2
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,310 @@ For more information about changelogs, check
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
8
8
|
|
9
|
+
## 0.32.2 - 2018-05-25
|
10
|
+
|
11
|
+
* Use YouTube Analytics API v2 instead of v1. See announcement of v1 deprecation
|
12
|
+
https://developers.google.com/youtube/analytics/revision_history#april-26-2018
|
13
|
+
|
14
|
+
## 0.32.1 - 2017-08-14
|
15
|
+
|
16
|
+
* [FEATURE] Add `Yt::ContentOwner#bulk_report_jobs`
|
17
|
+
* [FEATURE] Add `Yt::BulkReportJob#bulk_reports`
|
18
|
+
|
19
|
+
## 0.32.0 - 2017-07-05
|
20
|
+
|
21
|
+
**How to upgrade**
|
22
|
+
|
23
|
+
If your code is expecting data from `reports` methods to always include historical data (the data from the period before joining), now you have to set `historical: true` specifically. It will not include historical data by default.
|
24
|
+
|
25
|
+
* [IMPROVEMENT] Include historical data with `historical: true` option.
|
26
|
+
|
27
|
+
## 0.31.2 - 2017-06-29
|
28
|
+
|
29
|
+
* [BUGFIX] Return lifetime data correctly even when the channel joined content owner after a while since it's created.
|
30
|
+
|
31
|
+
## 0.31.1 - 2017-06-03
|
32
|
+
|
33
|
+
* [FEATURE] Add `by: :youtube_product` option for reports.
|
34
|
+
* [FEATURE] Add `Yt::Collections::Reports::YOUTUBE_PRODUCTS` to list all YouTube products (KIDS, GAMING, etc) supported by YouTube Analytics API.
|
35
|
+
* [FEATURE] Add more operating system dimensions to `Yt::Collections::Reports::OPERATING_SYSTEMS`.
|
36
|
+
|
37
|
+
## 0.31.0 - 2017-06-02
|
38
|
+
|
39
|
+
**How to upgrade**
|
40
|
+
|
41
|
+
If your code calls `.uniques` it should be removed because this metric has been
|
42
|
+
no longer supported by YouTube API as of [October 31, 2016](https://developers.google.com/youtube/analytics/revision_history#september-27-2016).
|
43
|
+
|
44
|
+
* [REMOVAL] Remove `#uniques` method for channels, videos and video groups.
|
45
|
+
|
46
|
+
## 0.30.1 - 2017-04-14
|
47
|
+
|
48
|
+
* [IMPROVEMENT] Retry 3 times if YouTube responds with 503 Backend Error
|
49
|
+
|
50
|
+
## 0.30.0 - 2017-03-17
|
51
|
+
|
52
|
+
**How to upgrade**
|
53
|
+
|
54
|
+
If your code uses `Yt::Models::Configuration` then you must use
|
55
|
+
`Yt::Configuration` instead.
|
56
|
+
|
57
|
+
Both `Yt::Configuration` and `Yt::Config` have been moved in a separate
|
58
|
+
gem called `yt-support` that is required by default by the `yt` gem.
|
59
|
+
|
60
|
+
* [REMOVAL] Remove `Yt::Models::Configuration` (renamed as `Yt::Configuration`)
|
61
|
+
|
62
|
+
## 0.29.1 - 2017-02-26
|
63
|
+
|
64
|
+
* [FEATURE] Add `Video#length` to show the duration as an ISO 8601 time.
|
65
|
+
|
66
|
+
## 0.29.0 - 2017-02-17
|
67
|
+
|
68
|
+
**How to upgrade**
|
69
|
+
|
70
|
+
If your code uses `Yt::URL` then you must include the `yt-url` gem, since
|
71
|
+
`Yt::URL` has been extracted into a separate repository.
|
72
|
+
Please read the documentation of `Yt::URL` and notice that the `subscription`
|
73
|
+
pattern has been dropped, so URLs such as the following will not be recognized
|
74
|
+
anymore: `subscription_center?add_user=...`, `subscribe_widget?p=...`.
|
75
|
+
|
76
|
+
Note that this also removes the option of initializing a resource by URL.
|
77
|
+
You can achieve the same result with the `yt-url` gem, as detailed in its
|
78
|
+
documentation.
|
79
|
+
|
80
|
+
Finally note that this also remove the class `Yt::Description`. This class
|
81
|
+
was private API, so this change should not affect developers.
|
82
|
+
|
83
|
+
* [REMOVAL] Remove the option to initialize resources by URL.
|
84
|
+
* [REMOVAL] Remove `Yt::Resource.username`
|
85
|
+
* [REMOVAL] Remove `Yt::URL` (extracted into separate gem)
|
86
|
+
* [REMOVAL] Remove `Yt::Description` (now simply a String).
|
87
|
+
|
88
|
+
## 0.28.5 - 2017-01-18
|
89
|
+
|
90
|
+
* [BUGFIX] Don't crash when Yt::VideoGroup is initialized with a group of playlists.
|
91
|
+
|
92
|
+
## 0.28.4 - 2017-01-18
|
93
|
+
|
94
|
+
* [BUGFIX] Don't crash when Yt::VideoGroup is initialized with a group of playlists.
|
95
|
+
|
96
|
+
## 0.28.3 - 2017-01-09
|
97
|
+
|
98
|
+
* [FEATURE] Add `VideoGroup#channels` method to load all channels under a group.
|
99
|
+
|
100
|
+
## 0.28.2 - 2017-01-09
|
101
|
+
|
102
|
+
* [FEATURE] Add `channel_url` to video.
|
103
|
+
|
104
|
+
## 0.28.1 - 2016-10-24
|
105
|
+
|
106
|
+
* [FEATURE] New `card impressions` report for video groups.
|
107
|
+
* [FEATURE] New `card clicks` report for video groups.
|
108
|
+
* [FEATURE] New `card click rate` report for video groups.
|
109
|
+
* [FEATURE] New `card teaser impressions` report for video groups.
|
110
|
+
* [FEATURE] New `card teaser clicks` report for video groups.
|
111
|
+
* [FEATURE] New `card teaser click rate` report for video groups.
|
112
|
+
|
113
|
+
## 0.28.0 - 2016-10-18
|
114
|
+
|
115
|
+
**How to upgrade**
|
116
|
+
|
117
|
+
If your code calls `.earnings` and `.impressions`
|
118
|
+
then you must replace that code with `.estimated_revenue` and
|
119
|
+
`.ad_impressions` since those metrics will no longer be supported by
|
120
|
+
YouTube API as of [November 4, 2016](https://developers.google.com/youtube/analytics/revision_history#august-10-2016).
|
121
|
+
|
122
|
+
* [REMOVAL] Remove `#earnings` method for channels, playlists, videos and video groups
|
123
|
+
* [REMOVAL] Remove `#impressions` method for channels, videos and video groups
|
124
|
+
* [FEATURE] Add `#estimated_revenue` method for channels, videos and video groups
|
125
|
+
* [FEATURE] Add `#ad_impressions` method for channels, videos and video groups
|
126
|
+
|
127
|
+
## 0.27.0 - 2016-10-07
|
128
|
+
|
129
|
+
**How to upgrade**
|
130
|
+
|
131
|
+
If your code calls any of the following `..._on` method to fetch metrics on
|
132
|
+
a specific day, you need to replace it with the equivalent method that does
|
133
|
+
not end with `_on`. For instance replace `views_on(3.days.ago)` with the
|
134
|
+
equivalent `views(since: 3.days.ago, until: 3.days.ago)`.
|
135
|
+
|
136
|
+
* [REMOVAL] Remove `#views_on` method for channels, playlists, videos and video groups
|
137
|
+
* [REMOVAL] Remove `#uniques_on` method for channels, playlists, videos and video groups
|
138
|
+
* [REMOVAL] Remove `#estimated_minutes_watched_on` method for channels, playlists, videos and video groups
|
139
|
+
* [REMOVAL] Remove `#viewer_percentage_on` method for channels, playlists, videos and video groups
|
140
|
+
* [REMOVAL] Remove `#comments_on` method for channels, playlists, videos and video groups
|
141
|
+
* [REMOVAL] Remove `#likes_on` method for channels, playlists, videos and video groups
|
142
|
+
* [REMOVAL] Remove `#dislikes_on` method for channels, playlists, videos and video groups
|
143
|
+
* [REMOVAL] Remove `#shares_on` method for channels, playlists, videos and video groups
|
144
|
+
* [REMOVAL] Remove `#subscribers_gained_on` method for channels, playlists, videos and video groups
|
145
|
+
* [REMOVAL] Remove `#subscribers_lost_on` method for channels, playlists, videos and video groups
|
146
|
+
* [REMOVAL] Remove `#videos_added_to_playlists_on` method for channels, playlists, videos and video groups
|
147
|
+
* [REMOVAL] Remove `#videos_removed_from_playlists_on` method for channels, playlists, videos and video groups
|
148
|
+
* [REMOVAL] Remove `#average_view_duration_on` method for channels, playlists, videos and video groups
|
149
|
+
* [REMOVAL] Remove `#average_view_percentage_on` method for channels, playlists, videos and video groups
|
150
|
+
* [REMOVAL] Remove `#annotation_clicks_on` method for channels, playlists, videos and video groups
|
151
|
+
* [REMOVAL] Remove `#annotation_click_through_rate_on` method for channels, playlists, videos and video groups
|
152
|
+
* [REMOVAL] Remove `#annotation_close_rate_on` method for channels, playlists, videos and video groups
|
153
|
+
* [REMOVAL] Remove `#card_impressions_on` method for channels, playlists, videos and video groups
|
154
|
+
* [REMOVAL] Remove `#card_clicks_on` method for channels, playlists, videos and video groups
|
155
|
+
* [REMOVAL] Remove `#card_click_rate_on` method for channels, playlists, videos and video groups
|
156
|
+
* [REMOVAL] Remove `#card_teaser_impressions_on` method for channels, playlists, videos and video groups
|
157
|
+
* [REMOVAL] Remove `#card_teaser_clicks_on` method for channels, playlists, videos and video groups
|
158
|
+
* [REMOVAL] Remove `#card_teaser_click_rate_on` method for channels, playlists, videos and video groups
|
159
|
+
* [REMOVAL] Remove `#earnings_on` method for channels, playlists, videos and video groups
|
160
|
+
* [REMOVAL] Remove `#impressions_on` method for channels, playlists, videos and video groups
|
161
|
+
* [REMOVAL] Remove `#monetized_playbacks_on` method for channels, playlists, videos and video groups
|
162
|
+
* [REMOVAL] Remove `#playback_based_cpm_on` method for channels, playlists, videos and video groups
|
163
|
+
|
164
|
+
## 0.26.3 - 2016-10-07
|
165
|
+
|
166
|
+
* [FEATURE] Add `by: :subscribed_status` option for reports, to return views (from a `content_owner.video`) by subscribed status.
|
167
|
+
* [FEATURE] Add `Yt::Collections::Reports::SUBSCRIBED_STATUSES` to list all subscribed statuses supported by YouTube Analytics API.
|
168
|
+
|
169
|
+
## 0.26.2 - 2016-10-05
|
170
|
+
|
171
|
+
* [ENHANCEMENT] Add newly available traffic sources: "Campaign card" and "End screen"
|
172
|
+
|
173
|
+
## 0.26.1 - 2016-10-05
|
174
|
+
|
175
|
+
* [FEATURE] New `card impressions` report for videos and channels.
|
176
|
+
* [FEATURE] New `card clicks` report for videos and channels.
|
177
|
+
* [FEATURE] New `card click rate` report for videos and channels.
|
178
|
+
* [FEATURE] New `card teaser impressions` report for videos and channels.
|
179
|
+
* [FEATURE] New `card teaser clicks` report for videos and channels.
|
180
|
+
* [FEATURE] New `card teaser click rate` report for videos and channels.
|
181
|
+
|
182
|
+
## 0.26.0 - 2016-10-05
|
183
|
+
|
184
|
+
**How to upgrade**
|
185
|
+
|
186
|
+
If your code calls `.favorites_added` and `.favorites_removed` on channels and
|
187
|
+
videos then you must remove that code since those metrics are not anymore
|
188
|
+
supported by YouTube API.
|
189
|
+
|
190
|
+
* [REMOVAL] Remove deprecated `favorites_added` metric for channels, videos, and video groups.
|
191
|
+
* [REMOVAL] Remove deprecated `favorites_removed` metric for channels, videos, and video groups
|
192
|
+
|
193
|
+
## 0.25.40 - 2016-09-19
|
194
|
+
|
195
|
+
* [IMPROVEMENT] Add `Yt::Claim#data` to access the policy of a claim
|
196
|
+
|
197
|
+
## 0.25.39 - 2016-06-15
|
198
|
+
|
199
|
+
* [FEATURE] Add `by: :operating_system` option for reports, to return views (from a `content_owner.video`) by operating system.
|
200
|
+
* [FEATURE] Add `Yt::Collections::Reports::DEVICE_TYPES` to list all device types supported by YouTube Analytics API.
|
201
|
+
* [FEATURE] Add `Yt::Collections::Reports::OPERATING_SYSTEMS` to list all operating systems supported by YouTube Analytics API.
|
202
|
+
|
203
|
+
## 0.25.38 - 2016-06-13
|
204
|
+
|
205
|
+
* [IMPROVEMENT] Don’t combine forContentOwner and publishedBefore parameters in Search#list since YouTube does not support this anymore.
|
206
|
+
|
207
|
+
## 0.25.37 - 2016-05-16
|
208
|
+
|
209
|
+
* [FEATURE] Add `VideoGroup#videos` to load all videos under a group of channels, as well as a group of videos.
|
210
|
+
|
211
|
+
## 0.25.36 - 2016-05-10
|
212
|
+
|
213
|
+
* [BUGFIX] Raise RequestError when authentication code is "invalid" or "already redeemed"
|
214
|
+
* [FEATURE] Make two methods `#explanation` and `#response_body` public for `Yt::Errors::RequestError`
|
215
|
+
|
216
|
+
## 0.25.35 - 2016-04-27
|
217
|
+
|
218
|
+
* [BUGFIX] Don’t try to eager load more than 50 assets at the time from claims
|
219
|
+
|
220
|
+
## 0.25.34 - 2016-04-20
|
221
|
+
|
222
|
+
* [FEATURE] Add `ad_breaks` and `tp_ad_server_video_id` attribute to AdvertisingOptionsSet
|
223
|
+
|
224
|
+
## 0.25.33 - 2016-04-15
|
225
|
+
|
226
|
+
* [FEATURE] Eager-loading claims from videos will also eager-load assets.
|
227
|
+
* [FEATURE] New method - `Claim#source` will return the source of the claim.
|
228
|
+
|
229
|
+
## 0.25.32 - 2016-04-12
|
230
|
+
|
231
|
+
* [BUGFIX] Fix where videos did not eager load claims or categories in subsequent requests.
|
232
|
+
|
233
|
+
## 0.25.31 - 2016-04-11
|
234
|
+
|
235
|
+
* [BUGFIX] Don’t try to instantiate video.claim if a video does not have a claim.
|
236
|
+
|
237
|
+
## 0.25.30 - 2016-04-07
|
238
|
+
|
239
|
+
* [FEATURE] Add ability for videos to eager load claims. For example, `$content_owner.videos.includes(:claim).first.claim.id`.
|
240
|
+
|
241
|
+
## 0.25.29 - 2016-04-07
|
242
|
+
|
243
|
+
* [BUGFIX] Previously, Yt was throttling queries for `quotaExceeded` responses from YouTube. However, matching `quotaExceeded` was too specific and would not have caught other limit exceeding responses from YouTube. This change will allow Yt to throttle other responses that contains `Exceeded` or `exceeded`.
|
244
|
+
|
245
|
+
## 0.25.28 - 2016-04-05
|
246
|
+
|
247
|
+
* [BUGFIX] If no asset ID is set, calling ContentOwner#assets will now use the path, /youtube/partner/v1/assetSearch, instead of '/youtube/partner/v1/assets'
|
248
|
+
|
249
|
+
## 0.25.27 - 2016-03-28
|
250
|
+
|
251
|
+
* [FEATURE] Add `comment_threads` association to Yt::Video.
|
252
|
+
* [FEATURE] Add `top_level_comment` and delegate its attributes (`text_display`, `author_display_name`, `like_count`, `updated_at`) to Yt::CommentThread.
|
253
|
+
|
254
|
+
## 0.25.26 - 2016-03-24
|
255
|
+
|
256
|
+
* [FEATURE] Add Yt::Comment resource.
|
257
|
+
|
258
|
+
## 0.25.25 - 2016-03-24
|
259
|
+
|
260
|
+
* [FEATURE] Add Yt::CommentThread resource.
|
261
|
+
|
262
|
+
## 0.25.24 - 2016-03-02
|
263
|
+
|
264
|
+
* [BUGFIX] When `videos.where(..)` returns more than one page, don’t retain the items for the next request.
|
265
|
+
|
266
|
+
## 0.25.23 - 2016-02-23
|
267
|
+
|
268
|
+
* [IMPROVEMENT] Retry 3 times after a server error, to bypass temporary glitches by YouTube.
|
269
|
+
* [IMPROVEMENT] Don’t combine forMine and publishedBefore parameters in Search#list since YouTube does not support this anymore.
|
270
|
+
|
271
|
+
## 0.25.22 - 2016-02-04
|
272
|
+
|
273
|
+
* [IMPROVEMENT] Deal with channels with more than 500 videos in a better way
|
274
|
+
|
275
|
+
## 0.25.21 - 2016-02-04
|
276
|
+
|
277
|
+
* [BUGFIX] Add required 'require' to have `.with_indifferent_access` in geography
|
278
|
+
|
279
|
+
## 0.25.20 - 2016-01-24
|
280
|
+
|
281
|
+
* [FEATURE] Add (undocumented) playback location dimensions SEARCH and BROWSE
|
282
|
+
|
283
|
+
## 0.25.19 - 2016-01-15
|
284
|
+
|
285
|
+
* [FEATURE] Add `:group_items` to Yt::VideoGroup (list items of a group)
|
286
|
+
* [FEATURE] Add `:includes(:video)` to `Yt::VideoGroup#group_items` (eagerly loads all the videos)
|
287
|
+
|
288
|
+
## 0.25.18 - 2016-01-08
|
289
|
+
|
290
|
+
* [FEATURE] Add Yt::COUNTRIES and Yt::US_STATES
|
291
|
+
* [FEATURE] Add YouTube Analytics Video Groups
|
292
|
+
* [FEATURE] Add `:video_groups` to Yt::Account (list video-groups created by an account)
|
293
|
+
* [FEATURE] Add `:video_groups` to Yt::ContentOwner (list video-groups on behalf of a content owner)
|
294
|
+
* [FEATURE] Add reports by video-group
|
295
|
+
|
296
|
+
## 0.25.17 - 2016-01-05
|
297
|
+
|
298
|
+
* [FEATURE] Add `:videos` to Yt::ContentOwner to list videos in network with a content owner
|
299
|
+
|
300
|
+
## 0.25.16 - 2015-12-19
|
301
|
+
|
302
|
+
* [FEATURE] Add `access_token_was_refreshed` to Yt::Account
|
303
|
+
|
304
|
+
## 0.25.15 - 2015-12-17
|
305
|
+
|
306
|
+
* [FEATURE] Add `revoke_access` to Yt::Account
|
307
|
+
|
308
|
+
## 0.25.14 - 2015-12-16
|
309
|
+
|
310
|
+
* [ENHANCEMENT] Add `:display_name` to each content owner returned by account.content_owners
|
311
|
+
* [BUGFIX] Don’t raise error when raising MissingAuth without any scope
|
312
|
+
|
9
313
|
## 0.25.13 - 2015-12-04
|
10
314
|
|
11
315
|
* [BUGFIX] Fix previous fix to Video#update with publishAt (typo)
|
@@ -458,7 +762,7 @@ error by using the `unsubscribe` method:
|
|
458
762
|
|
459
763
|
## 0.11.5 - 2014-08-27
|
460
764
|
|
461
|
-
* [BUGFIX] Make videos.where(id: '
|
765
|
+
* [BUGFIX] Make videos.where(id: 'jNQXAC9IVRw').first.id return 'jNQXAC9IVRw'
|
462
766
|
|
463
767
|
## 0.11.4 - 2014-08-27
|
464
768
|
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -23,11 +23,14 @@ channel.videos.count #=> 12
|
|
23
23
|
```
|
24
24
|
|
25
25
|
```ruby
|
26
|
-
video = Yt::Video.new id: '
|
26
|
+
video = Yt::Video.new id: 'jNQXAC9IVRw'
|
27
27
|
video.title #=> "Fullscreen Creator Platform"
|
28
28
|
video.comment_count #=> 308
|
29
29
|
video.hd? #=> true
|
30
30
|
video.annotations.count #=> 1
|
31
|
+
video.comment_threads #=> #<Yt::Collections::CommentThreads ...>
|
32
|
+
# Use #take to limit the number of pages need to fetch from server
|
33
|
+
video.comment_threads.take(99).map(&:author_display_name) #=> ["Paul", "Tommy", ...]
|
31
34
|
```
|
32
35
|
|
33
36
|
The **full documentation** is available at [rubydoc.info](http://www.rubydoc.info/gems/yt/frames).
|
@@ -41,7 +44,7 @@ To install on your system, run
|
|
41
44
|
|
42
45
|
To use inside a bundled Ruby project, add this line to the Gemfile:
|
43
46
|
|
44
|
-
gem 'yt', '~> 0.
|
47
|
+
gem 'yt', '~> 0.28.0'
|
45
48
|
|
46
49
|
Since the gem follows [Semantic Versioning](http://semver.org),
|
47
50
|
indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
|
@@ -68,6 +71,7 @@ Use [Yt::ContentOwner](http://www.rubydoc.info/gems/yt/Yt/Models/ContentOwner) t
|
|
68
71
|
* list and delete the references administered by the content owner
|
69
72
|
* list the policies and policy rules administered by the content owner
|
70
73
|
* create assets
|
74
|
+
* list assets
|
71
75
|
|
72
76
|
```ruby
|
73
77
|
# Content owners can be initialized with access token, refresh token or an authorization code
|
@@ -79,7 +83,7 @@ content_owner.partnered_channels.where(part: 'statistics').map &:subscriber_coun
|
|
79
83
|
|
80
84
|
content_owner.claims.where(q: 'Fullscreen').count #=> 24
|
81
85
|
content_owner.claims.first #=> #<Yt::Models::Claim @id=...>
|
82
|
-
content_owner.claims.first.video_id #=> '
|
86
|
+
content_owner.claims.first.video_id #=> 'jNQXAC9IVRw'
|
83
87
|
content_owner.claims.first.status #=> "active"
|
84
88
|
|
85
89
|
reference = content_owner.references.where(asset_id: "ABCDEFG").first #=> #<Yt::Models::Reference @id=...>
|
@@ -92,6 +96,13 @@ content_owner.policies.first.rules.first.action #=> "monetize"
|
|
92
96
|
content_owner.policies.first.rules.first.included_territories #=> ["US", "CA"]
|
93
97
|
|
94
98
|
content_owner.create_asset type: 'web' #=> #<Yt::Models::Asset @id=...>
|
99
|
+
|
100
|
+
content_owner.assets.first #=> #<Yt::Models::AssetSnippet:0x007ff2bc543b00 @id=...>
|
101
|
+
content_owner.assets.first.id #=> "A4532885163805730"
|
102
|
+
content_owner.assets.first.title #=> "Money Train"
|
103
|
+
content_owner.assets.first.type #=> "web"
|
104
|
+
content_owner.assets.first.custom_id #=> "MoKNJFOIRroc"
|
105
|
+
|
95
106
|
```
|
96
107
|
|
97
108
|
*All the above methods require authentication (see below).*
|
@@ -116,6 +127,76 @@ Yt::PlaylistItem
|
|
116
127
|
|
117
128
|
Check [fullscreen.github.io/yt](http://fullscreen.github.io/yt/playlist_items.html) for the list of methods available for `Yt::PlaylistItem`.
|
118
129
|
|
130
|
+
Yt::CommentThread
|
131
|
+
----------------
|
132
|
+
|
133
|
+
Use [Yt::CommentThread](http://www.rubydoc.info/gems/yt/Yt/Models/CommentThread) to:
|
134
|
+
|
135
|
+
* Show details of a comment_thread.
|
136
|
+
|
137
|
+
```ruby
|
138
|
+
Yt::CommentThread.new id: 'z13vsnnbwtv4sbnug232erczcmi3wzaug'
|
139
|
+
|
140
|
+
comment_thread.video_id #=> "1234"
|
141
|
+
comment_thread.total_reply_count #=> 1
|
142
|
+
comment_thread.can_reply? #=> true
|
143
|
+
comment_thread.public? #=> true
|
144
|
+
|
145
|
+
comment_thread.top_level_comment #=> #<Yt::Models::Comment ...>
|
146
|
+
comment_thread.text_display #=> "funny video!"
|
147
|
+
comment_thread.like_count #=> 9
|
148
|
+
comment_thread.updated_at #=> 2016-03-22 12:56:56 UTC
|
149
|
+
comment_thread.author_display_name #=> "Joe"
|
150
|
+
```
|
151
|
+
|
152
|
+
Yt::Comment
|
153
|
+
----------------
|
154
|
+
|
155
|
+
Use [Yt::Comment](http://www.rubydoc.info/gems/yt/Yt/Models/Comment) to:
|
156
|
+
|
157
|
+
* Get details of a comment.
|
158
|
+
|
159
|
+
```ruby
|
160
|
+
Yt::Comment.new id: 'z13vsnnbwtv4sbnug232erczcmi3wzaug'
|
161
|
+
|
162
|
+
comment.text_display #=> "awesome"
|
163
|
+
comment.author_display_name #=> "Jack"
|
164
|
+
comment.like_count #=> 1
|
165
|
+
comment.updated_at #=> 2016-03-22 12:56:56 UTC
|
166
|
+
comment.parent_id #=> "abc1234" (return nil if the comment is not a reply)
|
167
|
+
```
|
168
|
+
|
169
|
+
Yt::BulkReportJob
|
170
|
+
----------------
|
171
|
+
|
172
|
+
Use [Yt::BulkReportJob](http://www.rubydoc.info/gems/yt/Yt/Models/BulkReportJob) to:
|
173
|
+
|
174
|
+
* Get details of a bulk report job.
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
content_owner = Yt::ContentOwner.new owner_name: 'CMSname', access_token: 'ya29.1.ABCDEFGHIJ'
|
178
|
+
bulk_report_job = content_owner.bulk_report_jobs.first
|
179
|
+
|
180
|
+
bulk_report_job.report_type_id #=> "content_owner_demographics_a1"
|
181
|
+
```
|
182
|
+
|
183
|
+
Yt::BulkReport
|
184
|
+
----------------
|
185
|
+
|
186
|
+
Use [Yt::BulkReport](http://www.rubydoc.info/gems/yt/Yt/Models/BulkReport) to:
|
187
|
+
|
188
|
+
* Get details of a bulk report.
|
189
|
+
|
190
|
+
```ruby
|
191
|
+
content_owner = Yt::ContentOwner.new owner_name: 'CMSname', access_token: 'ya29.1.ABCDEFGHIJ'
|
192
|
+
bulk_report_job = content_owner.bulk_report_jobs.first
|
193
|
+
bulk_report = bulk_report_job.bulk_reports.first
|
194
|
+
|
195
|
+
bulk_report.start_time #=> 2017-08-11 07:00:00 UTC
|
196
|
+
bulk_report.end_time #=> 2017-08-12 07:00:00 UTC
|
197
|
+
bulk_report.download_url #=> "https://youtubereporting.googleapis.com/v1/..."
|
198
|
+
```
|
199
|
+
|
119
200
|
Yt::Collections::Videos
|
120
201
|
-----------------------
|
121
202
|
|
@@ -128,7 +209,7 @@ videos = Yt::Collections::Videos.new
|
|
128
209
|
videos.where(order: 'viewCount').first.title #=> "PSY - GANGNAM STYLE"
|
129
210
|
videos.where(q: 'Fullscreen CreatorPlatform', safe_search: 'none').size #=> 324
|
130
211
|
videos.where(chart: 'mostPopular', video_category_id: 44).first.title #=> "SINISTER - Trailer"
|
131
|
-
videos.where(id: '
|
212
|
+
videos.where(id: 'jNQXAC9IVRw,invalid').map(&:title) #=> ["Fullscreen Creator Platform"]
|
132
213
|
```
|
133
214
|
|
134
215
|
*The methods above do not require authentication.*
|
@@ -243,7 +324,7 @@ Use [Yt::AdvertisingOptionsSet](http://www.rubydoc.info/gems/yt/Yt/Models/Advert
|
|
243
324
|
|
244
325
|
```ruby
|
245
326
|
content_owner = Yt::ContentOwner.new owner_name: 'CMSname', access_token: 'ya29.1.ABCDEFGHIJ'
|
246
|
-
ad_options = Yt::AdvertisingOptionsSet.new video_id: '
|
327
|
+
ad_options = Yt::AdvertisingOptionsSet.new video_id: 'jNQXAC9IVRw', auth: $content_owner
|
247
328
|
ad_options.update ad_formats: %w(standard_instream long) #=> true
|
248
329
|
```
|
249
330
|
|