yt-andrewroth 0.25.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +27 -0
- data/.rspec +3 -0
- data/.travis.yml +9 -0
- data/.yardopts +5 -0
- data/CHANGELOG.md +732 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE +20 -0
- data/README.md +489 -0
- data/Rakefile +11 -0
- data/YOUTUBE_IT.md +835 -0
- data/bin/yt +30 -0
- data/gemfiles/Gemfile.activesupport-3.x +4 -0
- data/gemfiles/Gemfile.activesupport-4.x +4 -0
- data/lib/yt.rb +21 -0
- data/lib/yt/actions/base.rb +32 -0
- data/lib/yt/actions/delete.rb +19 -0
- data/lib/yt/actions/delete_all.rb +32 -0
- data/lib/yt/actions/insert.rb +42 -0
- data/lib/yt/actions/list.rb +139 -0
- data/lib/yt/actions/modify.rb +37 -0
- data/lib/yt/actions/patch.rb +19 -0
- data/lib/yt/actions/update.rb +19 -0
- data/lib/yt/associations/has_attribute.rb +55 -0
- data/lib/yt/associations/has_authentication.rb +214 -0
- data/lib/yt/associations/has_many.rb +22 -0
- data/lib/yt/associations/has_one.rb +22 -0
- data/lib/yt/associations/has_reports.rb +320 -0
- data/lib/yt/collections/advertising_options_sets.rb +34 -0
- data/lib/yt/collections/annotations.rb +62 -0
- data/lib/yt/collections/assets.rb +58 -0
- data/lib/yt/collections/authentications.rb +47 -0
- data/lib/yt/collections/base.rb +62 -0
- data/lib/yt/collections/channels.rb +31 -0
- data/lib/yt/collections/claim_histories.rb +34 -0
- data/lib/yt/collections/claims.rb +56 -0
- data/lib/yt/collections/content_details.rb +30 -0
- data/lib/yt/collections/content_owner_details.rb +34 -0
- data/lib/yt/collections/content_owners.rb +32 -0
- data/lib/yt/collections/device_flows.rb +23 -0
- data/lib/yt/collections/file_details.rb +30 -0
- data/lib/yt/collections/ids.rb +27 -0
- data/lib/yt/collections/live_streaming_details.rb +30 -0
- data/lib/yt/collections/ownerships.rb +34 -0
- data/lib/yt/collections/partnered_channels.rb +28 -0
- data/lib/yt/collections/players.rb +30 -0
- data/lib/yt/collections/playlist_items.rb +53 -0
- data/lib/yt/collections/playlists.rb +28 -0
- data/lib/yt/collections/policies.rb +28 -0
- data/lib/yt/collections/ratings.rb +23 -0
- data/lib/yt/collections/references.rb +46 -0
- data/lib/yt/collections/related_playlists.rb +43 -0
- data/lib/yt/collections/reports.rb +161 -0
- data/lib/yt/collections/resources.rb +57 -0
- data/lib/yt/collections/resumable_sessions.rb +51 -0
- data/lib/yt/collections/snippets.rb +27 -0
- data/lib/yt/collections/statistics_sets.rb +30 -0
- data/lib/yt/collections/statuses.rb +27 -0
- data/lib/yt/collections/subscribed_channels.rb +46 -0
- data/lib/yt/collections/subscribers.rb +33 -0
- data/lib/yt/collections/subscriptions.rb +50 -0
- data/lib/yt/collections/user_infos.rb +36 -0
- data/lib/yt/collections/video_categories.rb +35 -0
- data/lib/yt/collections/videos.rb +137 -0
- data/lib/yt/config.rb +54 -0
- data/lib/yt/errors/forbidden.rb +13 -0
- data/lib/yt/errors/missing_auth.rb +81 -0
- data/lib/yt/errors/no_items.rb +13 -0
- data/lib/yt/errors/request_error.rb +74 -0
- data/lib/yt/errors/server_error.rb +13 -0
- data/lib/yt/errors/unauthorized.rb +50 -0
- data/lib/yt/models/account.rb +216 -0
- data/lib/yt/models/advertising_options_set.rb +38 -0
- data/lib/yt/models/annotation.rb +132 -0
- data/lib/yt/models/asset.rb +111 -0
- data/lib/yt/models/asset_metadata.rb +38 -0
- data/lib/yt/models/asset_snippet.rb +46 -0
- data/lib/yt/models/authentication.rb +83 -0
- data/lib/yt/models/base.rb +32 -0
- data/lib/yt/models/channel.rb +302 -0
- data/lib/yt/models/claim.rb +156 -0
- data/lib/yt/models/claim_event.rb +67 -0
- data/lib/yt/models/claim_history.rb +29 -0
- data/lib/yt/models/configuration.rb +70 -0
- data/lib/yt/models/content_detail.rb +65 -0
- data/lib/yt/models/content_owner.rb +48 -0
- data/lib/yt/models/content_owner_detail.rb +18 -0
- data/lib/yt/models/description.rb +58 -0
- data/lib/yt/models/device_flow.rb +16 -0
- data/lib/yt/models/file_detail.rb +21 -0
- data/lib/yt/models/id.rb +9 -0
- data/lib/yt/models/iterator.rb +16 -0
- data/lib/yt/models/live_streaming_detail.rb +23 -0
- data/lib/yt/models/match_policy.rb +34 -0
- data/lib/yt/models/ownership.rb +75 -0
- data/lib/yt/models/player.rb +18 -0
- data/lib/yt/models/playlist.rb +218 -0
- data/lib/yt/models/playlist_item.rb +112 -0
- data/lib/yt/models/policy.rb +36 -0
- data/lib/yt/models/policy_rule.rb +124 -0
- data/lib/yt/models/rating.rb +37 -0
- data/lib/yt/models/reference.rb +172 -0
- data/lib/yt/models/resource.rb +136 -0
- data/lib/yt/models/resumable_session.rb +52 -0
- data/lib/yt/models/right_owner.rb +58 -0
- data/lib/yt/models/snippet.rb +50 -0
- data/lib/yt/models/statistics_set.rb +26 -0
- data/lib/yt/models/status.rb +32 -0
- data/lib/yt/models/subscription.rb +38 -0
- data/lib/yt/models/timestamp.rb +13 -0
- data/lib/yt/models/url.rb +90 -0
- data/lib/yt/models/user_info.rb +26 -0
- data/lib/yt/models/video.rb +630 -0
- data/lib/yt/models/video_category.rb +12 -0
- data/lib/yt/request.rb +278 -0
- data/lib/yt/version.rb +3 -0
- data/spec/collections/claims_spec.rb +30 -0
- data/spec/collections/playlist_items_spec.rb +44 -0
- data/spec/collections/playlists_spec.rb +27 -0
- data/spec/collections/policies_spec.rb +30 -0
- data/spec/collections/references_spec.rb +30 -0
- data/spec/collections/reports_spec.rb +30 -0
- data/spec/collections/subscriptions_spec.rb +25 -0
- data/spec/collections/videos_spec.rb +43 -0
- data/spec/errors/forbidden_spec.rb +10 -0
- data/spec/errors/missing_auth_spec.rb +24 -0
- data/spec/errors/no_items_spec.rb +10 -0
- data/spec/errors/request_error_spec.rb +44 -0
- data/spec/errors/server_error_spec.rb +10 -0
- data/spec/errors/unauthorized_spec.rb +10 -0
- data/spec/models/account_spec.rb +138 -0
- data/spec/models/annotation_spec.rb +180 -0
- data/spec/models/asset_spec.rb +20 -0
- data/spec/models/channel_spec.rb +127 -0
- data/spec/models/claim_event_spec.rb +62 -0
- data/spec/models/claim_history_spec.rb +27 -0
- data/spec/models/claim_spec.rb +211 -0
- data/spec/models/configuration_spec.rb +44 -0
- data/spec/models/content_detail_spec.rb +45 -0
- data/spec/models/content_owner_detail_spec.rb +6 -0
- data/spec/models/description_spec.rb +94 -0
- data/spec/models/file_detail_spec.rb +13 -0
- data/spec/models/live_streaming_detail_spec.rb +6 -0
- data/spec/models/ownership_spec.rb +59 -0
- data/spec/models/player_spec.rb +13 -0
- data/spec/models/playlist_item_spec.rb +120 -0
- data/spec/models/playlist_spec.rb +138 -0
- data/spec/models/policy_rule_spec.rb +63 -0
- data/spec/models/policy_spec.rb +41 -0
- data/spec/models/rating_spec.rb +12 -0
- data/spec/models/reference_spec.rb +249 -0
- data/spec/models/request_spec.rb +163 -0
- data/spec/models/resource_spec.rb +57 -0
- data/spec/models/right_owner_spec.rb +71 -0
- data/spec/models/snippet_spec.rb +13 -0
- data/spec/models/statistics_set_spec.rb +13 -0
- data/spec/models/status_spec.rb +13 -0
- data/spec/models/subscription_spec.rb +30 -0
- data/spec/models/url_spec.rb +78 -0
- data/spec/models/video_category_spec.rb +21 -0
- data/spec/models/video_spec.rb +669 -0
- data/spec/requests/as_account/account_spec.rb +125 -0
- data/spec/requests/as_account/authentications_spec.rb +139 -0
- data/spec/requests/as_account/channel_spec.rb +259 -0
- data/spec/requests/as_account/channels_spec.rb +18 -0
- data/spec/requests/as_account/playlist_item_spec.rb +56 -0
- data/spec/requests/as_account/playlist_spec.rb +244 -0
- data/spec/requests/as_account/resource_spec.rb +18 -0
- data/spec/requests/as_account/thumbnail.jpg +0 -0
- data/spec/requests/as_account/video.mp4 +0 -0
- data/spec/requests/as_account/video_spec.rb +408 -0
- data/spec/requests/as_content_owner/account_spec.rb +25 -0
- data/spec/requests/as_content_owner/advertising_options_set_spec.rb +15 -0
- data/spec/requests/as_content_owner/asset_spec.rb +20 -0
- data/spec/requests/as_content_owner/channel_spec.rb +1934 -0
- data/spec/requests/as_content_owner/claim_history_spec.rb +20 -0
- data/spec/requests/as_content_owner/content_owner_spec.rb +241 -0
- data/spec/requests/as_content_owner/match_policy_spec.rb +17 -0
- data/spec/requests/as_content_owner/ownership_spec.rb +25 -0
- data/spec/requests/as_content_owner/playlist_spec.rb +782 -0
- data/spec/requests/as_content_owner/video_spec.rb +1239 -0
- data/spec/requests/as_server_app/channel_spec.rb +74 -0
- data/spec/requests/as_server_app/playlist_item_spec.rb +30 -0
- data/spec/requests/as_server_app/playlist_spec.rb +53 -0
- data/spec/requests/as_server_app/video_spec.rb +58 -0
- data/spec/requests/as_server_app/videos_spec.rb +40 -0
- data/spec/requests/unauthenticated/video_spec.rb +22 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/support/fail_matcher.rb +15 -0
- data/spec/support/global_hooks.rb +48 -0
- data/yt.gemspec +32 -0
- metadata +416 -0
data/.gitignore
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
coverage/
|
15
|
+
Gemfile.lock
|
16
|
+
|
17
|
+
# Ignore all logfiles and tempfiles.
|
18
|
+
/log/*.log
|
19
|
+
/tmp
|
20
|
+
**/tmp
|
21
|
+
*.gem
|
22
|
+
*.sqlite3
|
23
|
+
|
24
|
+
doc/
|
25
|
+
.yardoc/
|
26
|
+
_site/
|
27
|
+
TODO.md
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,732 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
For more information about changelogs, check
|
6
|
+
[Keep a Changelog](http://keepachangelog.com) and
|
7
|
+
[Vandamme](http://tech-angels.github.io/vandamme).
|
8
|
+
|
9
|
+
## 0.25.5 - 2015-08-12
|
10
|
+
|
11
|
+
* [BUGIX] Correctly parse the YouTube response when requesting a refresh token with the wrong credentials.
|
12
|
+
|
13
|
+
## 0.25.4 - 2015-07-27
|
14
|
+
|
15
|
+
* [FEATURE] Add `channel.related_playlist` and `account.related_playlists` to access "Liked Videos", "Uploads", etc.
|
16
|
+
|
17
|
+
## 0.25.3 - 2015-07-23
|
18
|
+
|
19
|
+
* [BUGFIX] Don’t run an infinite loop when calling `.playlist_items.includes(:video)` on a playlist with only private or deleted videos
|
20
|
+
|
21
|
+
## 0.25.2 - 2015-07-22
|
22
|
+
|
23
|
+
* [FEATURE] Add .includes(:video) to .playlist_items to eager-load video data of a list of playlist items.
|
24
|
+
|
25
|
+
## 0.25.1 - 2015-07-06
|
26
|
+
|
27
|
+
* [ENHANCEMENT] `Yt::Video.new` accepts embedded video url.
|
28
|
+
|
29
|
+
## 0.25.0 - 2015-06-29
|
30
|
+
|
31
|
+
**How to upgrade**
|
32
|
+
|
33
|
+
If your code expects 10 videos when calling a report `by: :video` or
|
34
|
+
`by: :related_video`, beware that those reports now return 25 videos.
|
35
|
+
If you only need the first 10, just add `.first(10)` to your result.
|
36
|
+
For instance: `channel.views(by: :video).first(10).to_h`.
|
37
|
+
|
38
|
+
* [ENHANCEMENT] Return 25 results on reports by video / related video.
|
39
|
+
* [FEATURE] New `playback_based_cpm` report for channels and videos.
|
40
|
+
|
41
|
+
## 0.24.10 - 2015-06-25
|
42
|
+
|
43
|
+
* [BUGFIX] Don't break reports `by: :playlist` when trying to fetch their part by limiting to result to 50 playlists.
|
44
|
+
|
45
|
+
## 0.24.9 - 2015-06-19
|
46
|
+
|
47
|
+
* [BUGFIX] Let more than `max_results` videos be retrieved even when a `published_before` where condition is specified.
|
48
|
+
|
49
|
+
## 0.24.8 - 2015-06-18
|
50
|
+
|
51
|
+
* [FEATURE] New `by: :week` option for reports.
|
52
|
+
* [FEATURE] New Video#age_restricted? method
|
53
|
+
|
54
|
+
## 0.24.7 - 2015-06-08
|
55
|
+
|
56
|
+
* [ENHANCEMENT] Add `:videos` option to limit channel reports to subset of videos
|
57
|
+
|
58
|
+
## 0.24.6 - 2015-06-08
|
59
|
+
|
60
|
+
* [ENHANCEMENT] When grouping by day, return results in chronological order
|
61
|
+
|
62
|
+
## 0.24.5 - 2015-06-08
|
63
|
+
|
64
|
+
* [ENHANCEMENT] When grouping by device type, return results sorted by descending views
|
65
|
+
|
66
|
+
## 0.24.4 - 2015-06-05
|
67
|
+
|
68
|
+
* [ENHANCEMENT] When grouping by traffic source, country, state or playback location, return results sorted by descending views
|
69
|
+
|
70
|
+
## 0.24.3 - 2015-06-05
|
71
|
+
|
72
|
+
* [ENHANCEMENT] Add newly available traffic sources
|
73
|
+
|
74
|
+
## 0.24.1 - 2015-06-01
|
75
|
+
|
76
|
+
* [BUGFIX] Don't raise error when YouTube returns a deleted video while eager loading
|
77
|
+
|
78
|
+
## 0.24.0 - 2015-05-21
|
79
|
+
|
80
|
+
**How to upgrade**
|
81
|
+
|
82
|
+
If your code expects the `estimated_minutes_watched`
|
83
|
+
or the `average_view_duration` report to return a `Float`, beware that they now
|
84
|
+
return an `Integer` (since that is what YouTube returns).
|
85
|
+
In case you still need to parse a float, just append `.to_f` to the result.
|
86
|
+
|
87
|
+
* [ENHANCEMENT] Return Integer on `estimated_minutes_watched` reports
|
88
|
+
* [ENHANCEMENT] Return Integer on `average_view_duration` reports
|
89
|
+
* [FEATURE] New `by: :referrer` option for reports.
|
90
|
+
|
91
|
+
## 0.23.2 - 2015-05-20
|
92
|
+
|
93
|
+
* [FEATURE] Accept `:includes` in reports by video, related video and playlist to preload parts.
|
94
|
+
|
95
|
+
## 0.23.1 - 2015-05-19
|
96
|
+
|
97
|
+
* [FEATURE] New `by: :month` option for reports.
|
98
|
+
* [FEATURE] New `.reports` method to fetch multiple metrics at once.
|
99
|
+
|
100
|
+
## 0.23.0 - 2015-05-18
|
101
|
+
|
102
|
+
**How to upgrade**
|
103
|
+
|
104
|
+
If your code expects reports to return results **by day** then you **must** add
|
105
|
+
the `by: :day` option to your report method. The new default is `by: :range`.
|
106
|
+
For instance `channel.views` would return
|
107
|
+
|
108
|
+
{Wed, 8 May 2014 => 12.4, Thu, 9 May 2014 => 3.2, Fri, 10 May 2014 => …}
|
109
|
+
|
110
|
+
and now returns the same as calling `channel.views by: :range`:
|
111
|
+
|
112
|
+
{total: 3450}
|
113
|
+
|
114
|
+
Additionally, if you expect reports **by day** then you **must** specify the
|
115
|
+
`:since` option to your report method. Previously, this value was set to
|
116
|
+
`5.days.ago`, but now is required. `:until` still defaults to `Date.today`.
|
117
|
+
|
118
|
+
Finally, if you expect reports for the entire range, notice that the default
|
119
|
+
`:since` option is now set to the date when YouTube opened. Therefore calling a
|
120
|
+
method like `channel.views` now returns the **lifetime** views of a channel.
|
121
|
+
|
122
|
+
* [ENHANCEMENT] Change default from `by: :day` to `by: :range`.
|
123
|
+
* [ENHANCEMENT] Require `:since` options for any report by day.
|
124
|
+
* [ENHANCEMENT] Change default range for reports by range to lifetime.
|
125
|
+
|
126
|
+
## 0.22.2 - 2015-05-15
|
127
|
+
|
128
|
+
* [FEATURE] New `by: :search_term` option for reports.
|
129
|
+
* [FEATURE] New `in: {state: 'XX'}` option to limit reports to a US state
|
130
|
+
* [FEATURE] New `uniques by: :day` report
|
131
|
+
|
132
|
+
## 0.22.1 - 2015-05-13
|
133
|
+
|
134
|
+
* [FEATURE] New `by: :country` option for channel, video and playlist reports
|
135
|
+
* [FEATURE] New `by: :state` option for channel, video and playlist reports
|
136
|
+
* [FEATURE] New `:in` option to limit reports to a country
|
137
|
+
|
138
|
+
## 0.22.0 - 2015-04-30
|
139
|
+
|
140
|
+
**How to upgrade**
|
141
|
+
|
142
|
+
If your code expects any of the following method to return Float values, then
|
143
|
+
be aware that they now return Integer. You can still call `to_f` if you do need
|
144
|
+
a Float: views, `comments`, `likes`, `dislikes`, `shares`, `subscribers_gained`,
|
145
|
+
`subscribers_lost`, `favorites_added`, `favorites_removed`, `annotations`,
|
146
|
+
`impressions`, `monetized_playbacks`, `playlist_starts`.
|
147
|
+
|
148
|
+
* [ENHANCEMENT] Return `Integer` values for reports that can never return decimal digits.
|
149
|
+
* [FEATURE] New `by: :range` option for reports, to return a metric without dimensions (that is, for the whole range)
|
150
|
+
|
151
|
+
## 0.21.0 - 2015-04-30
|
152
|
+
|
153
|
+
**How to upgrade**
|
154
|
+
|
155
|
+
If your code doesn’t use `PolicyRule#ACTIONS`, then you are good to go.
|
156
|
+
If it does, then you should redefine the constant in your own app.
|
157
|
+
|
158
|
+
* [REMOVAL] Remove `PolicyRule#ACTIONS` (was `%q(block monetize takedown track)`).
|
159
|
+
* [BUGFIX] Make `account.playlists` and `account.channel.playlists` behave the same.
|
160
|
+
|
161
|
+
## 0.20.0 - 2015-04-29
|
162
|
+
|
163
|
+
**How to upgrade**
|
164
|
+
|
165
|
+
If your code doesn’t use any of the following constants that were public but
|
166
|
+
undocumented, then you are good to go.
|
167
|
+
|
168
|
+
If it does, then you should redefine those constants in your own app, since
|
169
|
+
it’s not Yt’s goal to validate the values posted to YouTube API.
|
170
|
+
|
171
|
+
* [REMOVAL] Remove `Asset#STATUSES` (was `%q(active inactive pending)`).
|
172
|
+
* [REMOVAL] Remove `Claim#STATUSES` (was `%q(active appealed disputed inactive pending potential takedown unknown)`).
|
173
|
+
* [REMOVAL] Remove `Claim#CONTENT_TYPES` (was `%q(audio video audiovisual)`).
|
174
|
+
* [REMOVAL] Remove `Reference#STATUSES` (was `%q(activating active checking computing_fingerprint deleted duplicate_on_hold inactive live_streaming_processing urgent_reference_processing)`).
|
175
|
+
* [REMOVAL] Remove `Reference#CONTENT_TYPES` (was `%q(audio video audiovisual)`).
|
176
|
+
* [REMOVAL] Remove `Status#PRIVACY_STATUSES` (was `%q(private public unlisted)`).
|
177
|
+
|
178
|
+
## 0.19.0 - 2015-04-28
|
179
|
+
|
180
|
+
**How to upgrade**
|
181
|
+
|
182
|
+
If your code never calls `partnered_channels.includes(:viewer_percentages)` on
|
183
|
+
a Yt::ContentOwner, then you are good to go.
|
184
|
+
|
185
|
+
If it does, then be aware that viewer percentage is not eager-loaded anymore,
|
186
|
+
so the call above is equivalent to `partenered_channels`. The reason is that
|
187
|
+
viewer percentage *requires* a time-range, and using a default range of the
|
188
|
+
last 3 months can generate more confusion than added value.
|
189
|
+
|
190
|
+
Also if your code still uses the deprecated:
|
191
|
+
|
192
|
+
- `.viewer_percentages` method, replace with `.viewer_percentage`.
|
193
|
+
- `policy.time_updated` method, replace with `policy.updated_at`.
|
194
|
+
- `video.uploaded?` method, replace with `video.uploading?`.
|
195
|
+
|
196
|
+
* [REMOVAL] Remove `.includes(:viewer_percentages)` on `content_owner.partnered_channels`.
|
197
|
+
* [REMOVAL] Remove deprecated `viewer_percentages` (use `viewer_percentage` instead)
|
198
|
+
* [REMOVAL] Remove deprecated `policy.time_updated` (use `updated_at` instead)
|
199
|
+
* [REMOVAL] Remove deprecated `video.uploaded?` (use `uploading?` instead)
|
200
|
+
|
201
|
+
## 0.18.0 - 2015-04-28
|
202
|
+
|
203
|
+
**How to upgrade**
|
204
|
+
|
205
|
+
If your code never calls `public?`, `private?` or `unlisted?` on a Status
|
206
|
+
object, then you are good to go.
|
207
|
+
|
208
|
+
If it does, then call the same methods on the parent Resource object instead.
|
209
|
+
For instance, replace `video.status.private?` with `video.private?`.
|
210
|
+
|
211
|
+
* [ENHANCEMENT] Don’t over-delegate privacy status methods of Resource.
|
212
|
+
|
213
|
+
## 0.17.0 - 2015-04-28
|
214
|
+
|
215
|
+
**How to upgrade**
|
216
|
+
|
217
|
+
If your code never calls video-specific methods on `video.status`, then you are
|
218
|
+
good to go.
|
219
|
+
|
220
|
+
If it does, then call the same methods on `video`, rather than `video.status`.
|
221
|
+
For instance, replace `video.status.deleted?` with `video.deleted?`.
|
222
|
+
|
223
|
+
* [ENHANCEMENT] Don’t over-delegate methods of Video.
|
224
|
+
* [ENHANCEMENT] Complete documentation of Yt::Video.
|
225
|
+
|
226
|
+
## 0.16.0 - 2015-04-27
|
227
|
+
|
228
|
+
**How to upgrade**
|
229
|
+
|
230
|
+
If your code never calls `video.uploaded?`, then you are good to go.
|
231
|
+
|
232
|
+
If it does, then replace your calls with `video.uploading?`.
|
233
|
+
In fact, the YouTube constant `uploaded` identifies the status where a
|
234
|
+
video is **being uploaded**.
|
235
|
+
|
236
|
+
* [ENHANCEMENT] Rename `uploaded?` to `uploading?` to avoid confusion.
|
237
|
+
|
238
|
+
## 0.15.3 - 2015-04-27
|
239
|
+
|
240
|
+
* [FEATURE] New `file_size`, `file_type`, `container` methods for Yt::Video.
|
241
|
+
* [BUGFIX] Retrieve `category_id` also for videos obtained through a search.
|
242
|
+
* [FEATURE] Add .includes(:category) to .videos in order to eager-load category title and ID of a collection of videos
|
243
|
+
|
244
|
+
## 0.15.2 - 2015-04-27
|
245
|
+
|
246
|
+
* [FEATURE] New `embed_html` method for Yt::Video.
|
247
|
+
|
248
|
+
## 0.15.1 - 2015-04-19
|
249
|
+
|
250
|
+
* [FEATURE] New `annotation clicks` report for videos and channels.
|
251
|
+
* [FEATURE] New `annotation click-through rate` report for videos and channels.
|
252
|
+
* [FEATURE] New `annotation close rate` report for videos and channels.
|
253
|
+
|
254
|
+
## 0.15.0 - 2015-04-19
|
255
|
+
|
256
|
+
**How to upgrade**
|
257
|
+
|
258
|
+
If your code never calls the `viewer_percentage(gender: [:female|:male])` method
|
259
|
+
on a Channel or Video object, then you are good to go.
|
260
|
+
|
261
|
+
If it does, then replace your calls to `viewer_percentage(gender: :female)`
|
262
|
+
with `viewer_percentage(by: gender)[:female]`, and do the same for `:male`.
|
263
|
+
|
264
|
+
Note that the _plural_ `viewer_percentages` method still works but it’s
|
265
|
+
deprecated: you should use `viewer_percentage` instead.
|
266
|
+
|
267
|
+
* [ENHANCEMENT] Remove `:gender` option in `viewer_percentage` in favor of a more generic `:by`
|
268
|
+
* [FEATURE] New `by: :gender` option for reports, to return viewer percentage by gender
|
269
|
+
* [FEATURE] New `by: :age_group` option for reports, to return viewer percentage by age group
|
270
|
+
* [ENHANCEMENT] The viewer percentage report now accepts start/end date options (like any other report)
|
271
|
+
* [DEPRECATION] Deprecate `viewer_percentages` in favor of `viewer_percentage`.
|
272
|
+
|
273
|
+
## 0.14.7 - 2015-04-17
|
274
|
+
|
275
|
+
* [FEATURE] New `by: :device_type` option for reports, to return views and estimated watched minutes (channels) by device
|
276
|
+
|
277
|
+
## 0.14.6 - 2015-04-17
|
278
|
+
|
279
|
+
* [BUGFIX] Rescue OpenSSL::SSL::SSLErrorWaitReadable only on version of Ruby that define it.
|
280
|
+
|
281
|
+
## 0.14.5 - 2015-04-15
|
282
|
+
|
283
|
+
* [BUGFIX] Raise `Yt::Errors::RequestError` when passing an invalid path or URL to `upload_thumbnail`
|
284
|
+
|
285
|
+
## 0.14.4 - 2015-04-14
|
286
|
+
|
287
|
+
* [FEATURE] New `by: :embedded_player_location` option for reports, to return views and estimated watched minutes (channels) by URL where the player was embedded
|
288
|
+
* [FEATURE] New `by: :playback_location` option for reports, to return views and estimated watched minutes (channels) by watch/embedded/channel/external app/mobile.
|
289
|
+
* [FEATURE] New `by: :related_video` option for reports, to return views and estimated watched minutes (channels) by the video that linked there.
|
290
|
+
|
291
|
+
## 0.14.3 - 2015-04-09
|
292
|
+
|
293
|
+
* [BUGFIX] Don't let request errors crash Yt in Ruby 1.9.3.
|
294
|
+
|
295
|
+
## 0.14.2 - 2015-04-08
|
296
|
+
|
297
|
+
* [FEATURE] Make `Annotation#text` a public method.
|
298
|
+
* [FEATURE] Make `data` a public method for Snippet, Status, ContentDetail and StatisticsSet.
|
299
|
+
* [FEATURE] Add .includes to .videos, so you can eager load snippet, status, statistics and content details for a collection of videos
|
300
|
+
|
301
|
+
## 0.14.1 - 2015-03-30
|
302
|
+
|
303
|
+
* [FEATURE] New `monetized playbacks` report for channels.
|
304
|
+
* [FEATURE] New `estimated watched minutes` report for videos.
|
305
|
+
* [FEATURE] New video reports: `average_view_duration`, `average_view_percentage`.
|
306
|
+
* [FEATURE] New `by: :playlist` option for reports, to return views and estimated watched minutes (channels) by playlist.
|
307
|
+
* [FEATURE] New playlist reports: `views`, `playlist_starts`, `average_time_in_playlist`, `views_per_playlist_start`.
|
308
|
+
|
309
|
+
|
310
|
+
## 0.14.0 - 2015-03-25
|
311
|
+
|
312
|
+
* [FEATURE] New `by: :traffic_source` option for reports, to return views (channels/videos) and estimated watched minutes (channels) by traffic source.
|
313
|
+
* [FEATURE] New `by: :video` option for reports, to return views and estimated watched minutes (channels) by video.
|
314
|
+
|
315
|
+
## 0.13.12 - 2015-03-23
|
316
|
+
|
317
|
+
* [FEATURE] New channel/video reports: `favorites_added`, `favorites_removed`.
|
318
|
+
|
319
|
+
## 0.13.11 - 2015-02-27
|
320
|
+
|
321
|
+
* [FEATURE] New channel reports: `subscribers_gained`, `subscribers_lost`.
|
322
|
+
* [FEATURE] New video reports: `subscribers_gained`, `subscribers_lost`.
|
323
|
+
* [FEATURE] New channel reports: `estimated_minutes_watched`, `average_view_duration`, `average_view_percentage`.
|
324
|
+
|
325
|
+
## 0.13.10 - 2015-02-17
|
326
|
+
|
327
|
+
* [FEATURE] New `video.upload_thumbnail` to upload the thumbnail for a video.
|
328
|
+
|
329
|
+
## 0.13.9 - 2015-02-16
|
330
|
+
|
331
|
+
* [ENHANCEMENT] Accept `force: true` in `authentication_url` to force approval prompt.
|
332
|
+
|
333
|
+
## 0.13.8 - 2015-01-15
|
334
|
+
|
335
|
+
* [FEATURE] AssetSearch resources available.
|
336
|
+
* [FEATURE] Access asset metadata (`effective` and `mine`) via the asset object.
|
337
|
+
* [ENHANCEMENT] Support `isManualClaim` parameter in claims#insert.
|
338
|
+
|
339
|
+
## 0.13.7 - 2014-10-27
|
340
|
+
|
341
|
+
* [FEATURE] New video reports: monetized playbacks.
|
342
|
+
|
343
|
+
## 0.13.6 - 2014-10-08
|
344
|
+
|
345
|
+
* [ENHANCEMENT] Accept `includes(:viewer_percentages)` in `.partnered_channels` to eager-load multiple viewer percentages at once.
|
346
|
+
* [ENHANCEMENT] Accept `where` in ViewerPercentages to collect data for multiple channels at once.
|
347
|
+
* [ENHANCEMENT] Accept `part` in the `where` clause of Channels, so statistics can be loaded at once.
|
348
|
+
|
349
|
+
## 0.13.5 - 2014-10-06
|
350
|
+
|
351
|
+
* [ENHANCEMENT] Add `advertising_options_set` and `ad_formats` to video
|
352
|
+
|
353
|
+
## 0.13.4 - 2014-10-01
|
354
|
+
|
355
|
+
* [ENHANCEMENT] Accept `policy` (with custom set of rules) in `content_owner.create_claim`
|
356
|
+
|
357
|
+
## 0.13.3 - 2014-10-01
|
358
|
+
|
359
|
+
* [BUGFIX] Rescue OpenSSL::SSL::SSLErrorWaitReadable raised by YouTube servers.
|
360
|
+
|
361
|
+
## 0.13.2 - 2014-10-01
|
362
|
+
|
363
|
+
* [FEATURE] Add `release!` to Ownership.
|
364
|
+
|
365
|
+
## 0.13.1 - 2014-09-18
|
366
|
+
|
367
|
+
* [BUGFIX] Make list videos by id work for exactly 50 ids.
|
368
|
+
|
369
|
+
## 0.13.0 - 2014-09-11
|
370
|
+
|
371
|
+
**How to upgrade**
|
372
|
+
|
373
|
+
If your code never calls the `create_playlist` on a Channel object, then you
|
374
|
+
are good to go.
|
375
|
+
|
376
|
+
If it does, then replace your calls to `channel.create_playlist` with
|
377
|
+
`account.create_playlist`, that is, call `create_playlist` on the channel’s
|
378
|
+
account instead.
|
379
|
+
|
380
|
+
* [ENHANCEMENT] Remove `create_playlist` from Channel (still exists on Account)
|
381
|
+
* [ENHANCEMENT] Accept `category_id` in `upload_video`.
|
382
|
+
|
383
|
+
## 0.12.2 - 2014-09-09
|
384
|
+
|
385
|
+
* [ENHANCEMENT] Accept `part` in the `where` clause of Videos, so statistics and content details can be eagerly loaded.
|
386
|
+
|
387
|
+
## 0.12.1 - 2014-09-04
|
388
|
+
|
389
|
+
* [ENHANCEMENT] Add `position` option to add_video (to specify where in a playlist to add a video)
|
390
|
+
* [FEATURE] Add `update` to PlaylistItem (to change the position of the item in the playlist)
|
391
|
+
|
392
|
+
## 0.12.0 - 2014-08-31
|
393
|
+
|
394
|
+
**How to upgrade**
|
395
|
+
|
396
|
+
If your code never calls the `delete` method directly on a Subscription
|
397
|
+
object (to delete subscriptions by id), then you are good to go.
|
398
|
+
|
399
|
+
If it does, then be aware that trying to delete an unknown subscription will
|
400
|
+
now raise a RequestError, and will not accept `ignore_errors` as an option:
|
401
|
+
|
402
|
+
account = Yt::Account.new access_token: 'ya29...'
|
403
|
+
subscription = Yt::Subscription.new id: '--unknown-id--', auth: account
|
404
|
+
# old behavior
|
405
|
+
subscription.delete ignore_errors: true # => false
|
406
|
+
# new behavior
|
407
|
+
subscription.delete # => raises Yt::Errors::RequestError "subscriptionNotFound"
|
408
|
+
|
409
|
+
Note that the `unsubscribe` and `unsubscribe!` methods of `Channel` have not
|
410
|
+
changed, so you can still try to unsubscribe from a channel and not raise an
|
411
|
+
error by using the `unsubscribe` method:
|
412
|
+
|
413
|
+
account = Yt::Account.new access_token: 'ya29...'
|
414
|
+
channel = Yt::Channel.new id: 'UC-CHANNEL-ID', auth: account
|
415
|
+
channel.unsubscribe # => returns falsey if you were not subscribed
|
416
|
+
channel.unsubscribe! # => raises Yt::Errors::RequestError if you were not subscribed
|
417
|
+
|
418
|
+
* [ENHANCEMENT] Replace `has_many :subscriptions` with `has_one :subscription` in Channel
|
419
|
+
* [FEATURE] Add `subscribed_channels` to Channel (list which channels the channel is subscribed to)
|
420
|
+
* [FEATURE] Add `subscribers` to Account (list which channels are subscribed to an account)
|
421
|
+
|
422
|
+
## 0.11.6 - 2014-08-28
|
423
|
+
|
424
|
+
* [BUGFIX] Make Resource.new(url: url).title hit the right endpoint
|
425
|
+
|
426
|
+
## 0.11.5 - 2014-08-27
|
427
|
+
|
428
|
+
* [BUGFIX] Make videos.where(id: 'MESycYJytkU').first.id return 'MESycYJytkU'
|
429
|
+
|
430
|
+
## 0.11.4 - 2014-08-27
|
431
|
+
|
432
|
+
* [ENHANCEMENT] Add Video search even by id, chart or rating
|
433
|
+
* [FEATURE] Add `ActiveSupport::Notification` to inspect HTTP requests
|
434
|
+
|
435
|
+
## 0.11.3 - 2014-08-21
|
436
|
+
|
437
|
+
* [FEATURE] Add `update` method to Asset model
|
438
|
+
|
439
|
+
## 0.11.2 - 2014-08-20
|
440
|
+
|
441
|
+
* [FEATURE] Add AdvertisingOptionsSet with `update` to change the advertising settings of a video
|
442
|
+
* [FEATURE] Add `content_owner.create_claim` and `claim.delete`
|
443
|
+
* [FEATURE] Add `update` method to Ownership to change owners of an asset
|
444
|
+
* [FEATURE] Add `asset.ownership` to list the owners of an asset
|
445
|
+
* [FEATURE] Add `content_owner.create_asset` and Asset model
|
446
|
+
|
447
|
+
## 0.11.1 - 2014-08-17
|
448
|
+
|
449
|
+
* [ENHANCEMENT] Add Video search even without a parent account or channel
|
450
|
+
|
451
|
+
For instance, to search for the most viewed video on the whole YouTube, run:
|
452
|
+
|
453
|
+
videos = Yt::Collections::Videos.new
|
454
|
+
videos.where(order: 'viewCount').first.title #=> "PSY - GANGNAM STYLE"
|
455
|
+
|
456
|
+
## 0.11.0 - 2014-08-17
|
457
|
+
|
458
|
+
**How to upgrade**
|
459
|
+
|
460
|
+
When a request to YouTube fails, Yt used to print out a verbose error message,
|
461
|
+
including the response body and the request that caused the error (in curl
|
462
|
+
format). This output could include sensitive data (such as the authentication
|
463
|
+
token). For security reasons, Yt will not print it out anymore by default.
|
464
|
+
|
465
|
+
If this is acceptable, then you are good to go.
|
466
|
+
If you want the old behavior, set the `log_level` of Yt to `:debug`:
|
467
|
+
|
468
|
+
Yt.configure do |config|
|
469
|
+
config.log_level = :debug
|
470
|
+
end
|
471
|
+
|
472
|
+
* [ENHANCEMENT] Add `log_level` to Yt.configuration
|
473
|
+
|
474
|
+
## 0.10.5 - 2014-08-17
|
475
|
+
|
476
|
+
* [ENHANCEMENT] Use PATCH rather than PUT to partially update a MatchPolicy
|
477
|
+
|
478
|
+
## 0.10.4 - 2014-08-15
|
479
|
+
|
480
|
+
* [BUGFIX] List tags of videos retrieved with channel.videos and account.videos
|
481
|
+
|
482
|
+
## 0.10.3 - 2014-08-12
|
483
|
+
|
484
|
+
* [FEATURE] Add methods to insert and delete ContentID references
|
485
|
+
* [FEATURE] Add `.match_reference_id` to Claim model
|
486
|
+
|
487
|
+
## 0.10.2 - 2014-08-11
|
488
|
+
|
489
|
+
* [FEATURE] Add `MatchPolicy` class with `.update` to change the policy used by an asset
|
490
|
+
|
491
|
+
## 0.10.1 - 2014-08-11
|
492
|
+
|
493
|
+
* [BUGFIX] Make Yt work on Ruby 1.9.3 / ActiveSupport 3.0 again (was broken by 0.10.0)
|
494
|
+
|
495
|
+
## 0.10.0 - 2014-08-11
|
496
|
+
|
497
|
+
**How to upgrade**
|
498
|
+
|
499
|
+
If your code never calls the `size` method to count how many items a list of
|
500
|
+
results has (e.g., how many videos an account has), then you are good to go.
|
501
|
+
|
502
|
+
If it does, then be aware that `size` will now return try to the number of
|
503
|
+
items as specified in the "totalResults" field of the first page of the YouTube
|
504
|
+
response, rather than loading *all* the pages (possibly thousands) and counting
|
505
|
+
exactly how many items are returned.
|
506
|
+
|
507
|
+
If this is acceptable, then you are good to go.
|
508
|
+
If you want the old behavior, replace `size` with `count`:
|
509
|
+
|
510
|
+
account = Yt::Account.new access_token: 'ya29...'
|
511
|
+
# old behavior
|
512
|
+
account.videos.size # => retrieved *all* the pages of the account’s videos
|
513
|
+
# new behavior
|
514
|
+
account.videos.size # => retrieves only the first page, returning the totalResults counter
|
515
|
+
account.videos.count # => retrieves *all* the pages of the account’s videos
|
516
|
+
|
517
|
+
* [ENHANCEMENT] Calling `size` on a collection does not load all the pages of the collection
|
518
|
+
* [ENHANCEMENT] Alias `policy.time_updated` to more coherent `policy.updated_at`
|
519
|
+
|
520
|
+
## 0.9.8 - 2014-08-11
|
521
|
+
|
522
|
+
* [FEATURE] Add `.content_owner` and `.linked_at` to channels managed by a CMS content owner
|
523
|
+
|
524
|
+
## 0.9.7 - 2014-08-02
|
525
|
+
|
526
|
+
* [BUGFIX] Correctly parse videos’ duration for videos longer than 24 hours
|
527
|
+
|
528
|
+
## 0.9.6 - 2014-08-02
|
529
|
+
|
530
|
+
* [ENHANCEMENT] Accept angle brackets characters in videos’ and playlists’ metadata
|
531
|
+
|
532
|
+
## 0.9.5 - 2014-08-02
|
533
|
+
|
534
|
+
* [FEATURE] Allow status attributes of a video to be updated
|
535
|
+
|
536
|
+
`video.update` now accepts three new attributes: `privacy_status`,
|
537
|
+
`public_stats_viewable` and `publish_at`.
|
538
|
+
|
539
|
+
## 0.9.4 - 2014-08-02
|
540
|
+
|
541
|
+
* [FEATURE] Expose metadata for live-streaming videos
|
542
|
+
|
543
|
+
New method are now available for `Video` instance to check their live-streaming
|
544
|
+
details: `actual_start_time`, `actual_end_time`, `scheduled_start_time`,
|
545
|
+
`scheduled_end_time` and `concurrent_viewers`.
|
546
|
+
|
547
|
+
## 0.9.3 - 2014-07-30
|
548
|
+
|
549
|
+
* [BUGFIX] Don’t cache `.where` conditions on multiple calls
|
550
|
+
|
551
|
+
For instance, invoking `account.videos.where(q: 'x').count` followed by
|
552
|
+
`account.videos.count` used to return the same result, because the `where`
|
553
|
+
conditions of the first request were wrongly kept for the successive request.
|
554
|
+
|
555
|
+
* [FEATURE] Check if a ContentID claim is third-party with `claim.third_party?`
|
556
|
+
* [ENHANCEMENT] `update` methods accept both underscore and camel-case attributes
|
557
|
+
|
558
|
+
For instance, either of the following syntaxes can now be used:
|
559
|
+
`video.update categoryId: "22"` or `video.update category_id: "22"`.
|
560
|
+
|
561
|
+
## 0.9.2 - 2014-07-29
|
562
|
+
|
563
|
+
* [FEATURE] List ContentID policies with `content_owner.policies`
|
564
|
+
|
565
|
+
## 0.9.1 - 2014-07-28
|
566
|
+
|
567
|
+
* [FEATURE] List ContentID references with `content_owner.references`
|
568
|
+
* [ENHANCEMENT] `playlist.update` accepts both `privacyStatus` and `privacy_status`
|
569
|
+
|
570
|
+
For instance, either of the following syntaxes can now be used:
|
571
|
+
`playlist.update privacyStatus: "unlisted"` or
|
572
|
+
`playlist.update privacy_status: "unlisted"`.
|
573
|
+
|
574
|
+
## 0.9.0 - 2014-07-28
|
575
|
+
|
576
|
+
**How to upgrade**
|
577
|
+
|
578
|
+
If your code never declares instances of `Yt::Rating`, or never calls the
|
579
|
+
`update` method on them, then you are good to go.
|
580
|
+
|
581
|
+
If it does, then *simply replace `update` with `set`*:
|
582
|
+
|
583
|
+
rating = Yt::Rating.new
|
584
|
+
# old syntax
|
585
|
+
rating.update :like
|
586
|
+
# new syntax
|
587
|
+
rating.set :like
|
588
|
+
|
589
|
+
* [ENHANCEMENT] `rating.set` replaces `rating.update` to rate a video
|
590
|
+
|
591
|
+
## 0.8.5 - 2014-07-28
|
592
|
+
|
593
|
+
* [FEATURE] Delete a video with `video.delete`
|
594
|
+
|
595
|
+
## 0.8.4 - 2014-07-24
|
596
|
+
|
597
|
+
* [BUGFIX] Correctly parse annotations with timestamp written as `t='0'`
|
598
|
+
|
599
|
+
## 0.8.3 - 2014-07-24
|
600
|
+
|
601
|
+
* [FEATURE] List content owners managed by an account with `account.content_owners`
|
602
|
+
|
603
|
+
## 0.8.2 - 2014-07-23
|
604
|
+
|
605
|
+
* [FEATURE] List ContentID claims administered by a content owner with `content_owner.claims`
|
606
|
+
|
607
|
+
## 0.8.1 - 2014-07-22
|
608
|
+
|
609
|
+
* [FEATURE] Include all the video-related status information in `video.status`
|
610
|
+
|
611
|
+
New method are now available for `Video` instance to check their status
|
612
|
+
information: `public?`, `uploaded?`, `rejected?`, `failed?`, `processed?`,
|
613
|
+
`deleted?`, `uses_unsupported_codec?`, `has_failed_conversion?`, `empty?`,
|
614
|
+
`invalid?`, `too_small?`, `aborted?`, `claimed?`, `infringes_copyright?`,
|
615
|
+
`duplicate?`, `inappropriate?`, `too_long?`, `belongs_to_closed_account?`,
|
616
|
+
`infringes_trademark?`, `violates_terms_of_use?`, `has_public_stats_viewable?`,
|
617
|
+
`belongs_to_suspended_account?`, `scheduled?`, `scheduled_at`, `embeddable?`
|
618
|
+
`licensed_as_creative_commons?` and `licensed_as_standard_youtube?`.
|
619
|
+
|
620
|
+
## 0.8.0 - 2014-07-19
|
621
|
+
|
622
|
+
**How to upgrade**
|
623
|
+
|
624
|
+
If your code never declares instances of `Yt::Channel`, or never calls the
|
625
|
+
`subscribe` method on them, then you are good to go.
|
626
|
+
|
627
|
+
If it does, then be aware that `subscribe` will not raise an error anymore if
|
628
|
+
a YouTube user tries to subscribe to her/his own YouTube channel. Instead,
|
629
|
+
`subscribe` will simply return `nil`.
|
630
|
+
|
631
|
+
If this is acceptable, then you are good to go.
|
632
|
+
If you want the old behavior, replace `subscribe` with `subscribe!`:
|
633
|
+
|
634
|
+
account = Yt::Account.new access_token: 'ya29...'
|
635
|
+
channel = account.channel
|
636
|
+
# old behavior
|
637
|
+
channel.subscribe # => raised an error
|
638
|
+
# new behavior
|
639
|
+
channel.subscribe # => nil
|
640
|
+
channel.subscribe! # => raises an error
|
641
|
+
|
642
|
+
* [ENHANCEMENT] `channel.subscribe` does not raise error when trying to subscribe to one’s own channel
|
643
|
+
|
644
|
+
## 0.7 - 2014/06/18
|
645
|
+
|
646
|
+
* [breaking change] Rename DetailsSet to ContentDetail
|
647
|
+
* Add statistics_set to Video (views, likes, dislikes, favorites, comments)
|
648
|
+
* Add statistics_set to Channel (views, comments, videos, subscribers)
|
649
|
+
* More snippet methods for Video (channel_id, channel_title, category_id, live_broadcast_content)
|
650
|
+
* More snippet methods for Playlist (channel_id, channel_title)
|
651
|
+
* More snippet methods for PlaylistItem (channel_id, channel_title, playlist_id, video_id)
|
652
|
+
* More status methods for PlaylistItem (privacy_status, public?, private?, unlisted?)
|
653
|
+
* Add video.update to update title, description, tags and categoryId of a video
|
654
|
+
* Sort channel.videos by most recent first
|
655
|
+
* Extract Reports (earnings, views) into module with macro `has_report`
|
656
|
+
* New channel reports: comments, likes, dislikes, shares and impressions
|
657
|
+
* Allow both normal and partnered channels to retrieve reports about views, comments, likes, dislikes, shares
|
658
|
+
* Make reports available also on Video (not just Channel)
|
659
|
+
* New account.upload_video to upload a video (either local or remote).
|
660
|
+
* Make channel.videos access more than 500 videos per channel
|
661
|
+
* Add viewer percentage (age group, gender) to Channel and Video reports
|
662
|
+
|
663
|
+
## 0.6 - 2014/06/05
|
664
|
+
|
665
|
+
* [breaking change] Rename Channel#earning to Channel#earnings_on
|
666
|
+
* [breaking change] Account#videos shows *all* videos owned by account (public and private)
|
667
|
+
* Add the .status association to *every* type of resource (Channel, Video, Playlist)
|
668
|
+
* Allow account.videos to be chained with .where, such as in account.videos.where(q: 'query')
|
669
|
+
* Retry request once when YouTube times out
|
670
|
+
* Handle annotations with "never" as the timestamp, without text, singleton positions, of private videos
|
671
|
+
* New methods for Video: hd?, stereoscopic?, captioned?, licensed?
|
672
|
+
|
673
|
+
## 0.5 - 2014/05/16
|
674
|
+
|
675
|
+
* More complete custom exception Yt::Error, with code, body and curl
|
676
|
+
* Replace `:ignore_not_found` and `:ignore_duplicates` with `:ignore_errors`
|
677
|
+
* Allow resources to be initialized with a url, such as Yt::Resource.new url: 'youtube.com/fullscreen'
|
678
|
+
* Add `has_one :id` to resources, to retrieve the ID of resources initialized by URL
|
679
|
+
* Raise an error if some `has_one` associations are not found (id, snippet, details set, user info)
|
680
|
+
* Don't check for the right :scope if Account is initialized with credentials
|
681
|
+
* Move models in Yt::Models but still auto-include them in the main namespace
|
682
|
+
* New Authentication model to separate `access_token` and `refresh_token` from Account
|
683
|
+
* New types of Errors that render more verbose errors and the failing request in cURL syntax
|
684
|
+
* Separate Error class for 500 error, so they can be easily found in app logs
|
685
|
+
* New Earning collection to retrieve estimated earning for YouTube-partnered channels
|
686
|
+
* Rename error classes so they match the corresponding Net::HTTP errors (e.g. Unauthorized)
|
687
|
+
* Separate Error class for 403 Error
|
688
|
+
* Retry once YouTube earning queries that return error 400 "Invalid query. Query did not conform to the expectations"
|
689
|
+
* Update RSpec to 3.0 (only required in development/testing)
|
690
|
+
* New ContentOwner subclass of Account with access to partnered channels
|
691
|
+
* Automatically refresh the access token when it expires or becomes invalid
|
692
|
+
* Retry once YouTube earning queries that return error 503
|
693
|
+
* Wait 3 seconds and retry *every* request that returns 500, 503 or 400 with "Invalid query"
|
694
|
+
* New Views collection to retrieve view count for YouTube-partnered channels
|
695
|
+
|
696
|
+
## 0.4 - 2014/05/09
|
697
|
+
|
698
|
+
* Complete rewrite, using ActiveSupport and separating models and collections
|
699
|
+
* New methods to handle annotations, details sets
|
700
|
+
* Supports also ActiveSupport 3 and Ruby 1.9.3 (not just AS4 + Ruby 2)
|
701
|
+
* Fix parsing annotation and timestamps longer than 1 hour
|
702
|
+
* Fix delegating tags from resources to snippets
|
703
|
+
* Two options to add videos to a playlist: fail or not if a video is missing or its account terminated
|
704
|
+
* Allow to configure Yt credentials through environment variables
|
705
|
+
* When updating a playlist, only changes the specified attributes
|
706
|
+
|
707
|
+
## 0.3.0 - 2014/04/16
|
708
|
+
|
709
|
+
* New and improved methods to handle subscriptions, playlists, playlist items
|
710
|
+
* `find_or_create_playlist_by` does not yield a block anymore
|
711
|
+
* `account.subscribe_to!` raises error in case of duplicate subscription, but `account.subscribe_to` does not
|
712
|
+
|
713
|
+
## 0.2.1 - 2014/04/10
|
714
|
+
|
715
|
+
* `account.subscribe_to!` does not raise error in case of duplicate subscription
|
716
|
+
* Accountable objects can be initialized with the OAuth access token if there's no need to get a fresh one with a refresh token
|
717
|
+
|
718
|
+
## 0.2.0 - 2014/04/09
|
719
|
+
|
720
|
+
* Replaced `account.perform!` with `account.like!`, `account.subscribe_to!`
|
721
|
+
* Added `account.add_to!` to add a video to an account’s playlist
|
722
|
+
* Added `account.find_or_create_playlist_by` to find or create an account’s playlist
|
723
|
+
|
724
|
+
## 0.1.1 - 2014/04/09
|
725
|
+
|
726
|
+
* Added support for Ruby 2.0.0
|
727
|
+
|
728
|
+
## 0.1.0 - 2014/04/08
|
729
|
+
|
730
|
+
* Support for authenticated resources: Youtube accounts and Google accounts
|
731
|
+
* Support for public Youtube resources: channels and videos
|
732
|
+
* Available actions for authenticated Youtube accounts: like a video, subscribe to a channel
|