yt 0.26.0 → 0.26.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/lib/yt/models/channel.rb +18 -0
- data/lib/yt/models/video.rb +18 -0
- data/lib/yt/version.rb +1 -1
- data/spec/requests/as_account/channel_spec.rb +6 -0
- data/spec/requests/as_account/video_spec.rb +6 -0
- data/spec/requests/as_content_owner/channel_spec.rb +12 -5
- data/spec/requests/as_content_owner/video_spec.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 728fa911c1fe9ca5bc1fc4be70e39aec49c725b9
|
4
|
+
data.tar.gz: b7bad458b65b80d30c89e3ab9a81c6576f839391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 813f25f58f1fea88c21e337f4d0654ab1d22ce6bd22c4229575a6326f5ece6bc0a77d566c73c91e97ecb2c392ae0fc05b1cf5f2e20930f49fc9b0d27a9c32889
|
7
|
+
data.tar.gz: a0325398f13e3189ad4edbfa45820cdc8b7764ed4be60dc928fcde0eeada6b469314ab16dddf4d6b8cb859719c02cce184af767d3ba3ab6bfe30b84db4da8441
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,15 @@ 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.26.1 - 2016-10-05
|
10
|
+
|
11
|
+
* [FEATURE] New `card impressions` report for videos and channels.
|
12
|
+
* [FEATURE] New `card clicks` report for videos and channels.
|
13
|
+
* [FEATURE] New `card click rate` report for videos and channels.
|
14
|
+
* [FEATURE] New `card teaser impressions` report for videos and channels.
|
15
|
+
* [FEATURE] New `card teaser clicks` report for videos and channels.
|
16
|
+
* [FEATURE] New `card teaser click rate` report for videos and channels.
|
17
|
+
|
9
18
|
## 0.26.0 - 2016-10-05
|
10
19
|
|
11
20
|
**How to upgrade**
|
data/README.md
CHANGED
@@ -44,7 +44,7 @@ To install on your system, run
|
|
44
44
|
|
45
45
|
To use inside a bundled Ruby project, add this line to the Gemfile:
|
46
46
|
|
47
|
-
gem 'yt', '~> 0.
|
47
|
+
gem 'yt', '~> 0.26.1'
|
48
48
|
|
49
49
|
Since the gem follows [Semantic Versioning](http://semver.org),
|
50
50
|
indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
|
data/lib/yt/models/channel.rb
CHANGED
@@ -162,6 +162,24 @@ module Yt
|
|
162
162
|
# @macro report_by_day_and_state
|
163
163
|
has_report :annotation_close_rate, Float
|
164
164
|
|
165
|
+
# @macro report_by_day_and_state
|
166
|
+
has_report :card_impressions, Integer
|
167
|
+
|
168
|
+
# @macro report_by_day_and_state
|
169
|
+
has_report :card_clicks, Integer
|
170
|
+
|
171
|
+
# @macro report_by_day_and_state
|
172
|
+
has_report :card_click_rate, Float
|
173
|
+
|
174
|
+
# @macro report_by_day_and_state
|
175
|
+
has_report :card_teaser_impressions, Integer
|
176
|
+
|
177
|
+
# @macro report_by_day_and_state
|
178
|
+
has_report :card_teaser_clicks, Integer
|
179
|
+
|
180
|
+
# @macro report_by_day_and_state
|
181
|
+
has_report :card_teaser_click_rate, Float
|
182
|
+
|
165
183
|
# @macro report_by_day_and_country
|
166
184
|
has_report :earnings, Float
|
167
185
|
|
data/lib/yt/models/video.rb
CHANGED
@@ -445,6 +445,24 @@ module Yt
|
|
445
445
|
# @macro report_by_day_and_state
|
446
446
|
has_report :annotation_close_rate, Float
|
447
447
|
|
448
|
+
# @macro report_by_day_and_state
|
449
|
+
has_report :card_impressions, Integer
|
450
|
+
|
451
|
+
# @macro report_by_day_and_state
|
452
|
+
has_report :card_clicks, Integer
|
453
|
+
|
454
|
+
# @macro report_by_day_and_state
|
455
|
+
has_report :card_click_rate, Float
|
456
|
+
|
457
|
+
# @macro report_by_day_and_state
|
458
|
+
has_report :card_teaser_impressions, Integer
|
459
|
+
|
460
|
+
# @macro report_by_day_and_state
|
461
|
+
has_report :card_teaser_clicks, Integer
|
462
|
+
|
463
|
+
# @macro report_by_day_and_state
|
464
|
+
has_report :card_teaser_click_rate, Float
|
465
|
+
|
448
466
|
# @macro report_by_day_and_country
|
449
467
|
has_report :earnings, Float
|
450
468
|
|
data/lib/yt/version.rb
CHANGED
@@ -221,6 +221,12 @@ describe Yt::Channel, :device_app do
|
|
221
221
|
expect{channel.annotation_clicks}.not_to raise_error
|
222
222
|
expect{channel.annotation_click_through_rate}.not_to raise_error
|
223
223
|
expect{channel.annotation_close_rate}.not_to raise_error
|
224
|
+
expect{channel.card_impressions}.not_to raise_error
|
225
|
+
expect{channel.card_clicks}.not_to raise_error
|
226
|
+
expect{channel.card_click_rate}.not_to raise_error
|
227
|
+
expect{channel.card_teaser_impressions}.not_to raise_error
|
228
|
+
expect{channel.card_teaser_clicks}.not_to raise_error
|
229
|
+
expect{channel.card_teaser_click_rate}.not_to raise_error
|
224
230
|
expect{channel.viewer_percentage}.not_to raise_error
|
225
231
|
expect{channel.earnings}.to raise_error Yt::Errors::Unauthorized
|
226
232
|
expect{channel.impressions}.to raise_error Yt::Errors::Unauthorized
|
@@ -298,6 +298,12 @@ describe Yt::Video, :device_app do
|
|
298
298
|
expect{video.annotation_clicks}.not_to raise_error
|
299
299
|
expect{video.annotation_click_through_rate}.not_to raise_error
|
300
300
|
expect{video.annotation_close_rate}.not_to raise_error
|
301
|
+
expect{video.card_impressions}.not_to raise_error
|
302
|
+
expect{video.card_clicks}.not_to raise_error
|
303
|
+
expect{video.card_click_rate}.not_to raise_error
|
304
|
+
expect{video.card_teaser_impressions}.not_to raise_error
|
305
|
+
expect{video.card_teaser_clicks}.not_to raise_error
|
306
|
+
expect{video.card_teaser_click_rate}.not_to raise_error
|
301
307
|
expect{video.viewer_percentage}.not_to raise_error
|
302
308
|
expect{video.earnings}.to raise_error Yt::Errors::Unauthorized
|
303
309
|
expect{video.impressions}.to raise_error Yt::Errors::Unauthorized
|
@@ -18,10 +18,12 @@ describe Yt::Channel, :partner do
|
|
18
18
|
videos_added_to_playlists: Integer, videos_removed_from_playlists: Integer,
|
19
19
|
average_view_duration: Integer,
|
20
20
|
average_view_percentage: Float, annotation_clicks: Integer,
|
21
|
-
annotation_click_through_rate: Float,
|
22
|
-
|
21
|
+
annotation_click_through_rate: Float, annotation_close_rate: Float,
|
22
|
+
card_impressions: Integer, card_clicks: Integer,
|
23
|
+
card_click_rate: Float, card_teaser_impressions: Integer,
|
24
|
+
card_teaser_clicks: Integer, card_teaser_click_rate: Float,
|
25
|
+
earnings: Float, impressions: Integer,
|
23
26
|
monetized_playbacks: Integer, playback_based_cpm: Float}
|
24
|
-
|
25
27
|
specify 'by day, and are chronologically sorted' do
|
26
28
|
range = {since: 5.days.ago.to_date, until: 3.days.ago.to_date}
|
27
29
|
result = channel.reports range.merge(only: metrics, by: :day)
|
@@ -62,8 +64,10 @@ describe Yt::Channel, :partner do
|
|
62
64
|
:videos_added_to_playlists, :videos_removed_from_playlists,
|
63
65
|
:estimated_minutes_watched, :average_view_duration,
|
64
66
|
:average_view_percentage, :impressions, :monetized_playbacks,
|
65
|
-
:annotation_clicks, :annotation_click_through_rate,
|
66
|
-
:
|
67
|
+
:annotation_clicks, :annotation_click_through_rate,
|
68
|
+
:card_impressions, :card_clicks, :card_click_rate,
|
69
|
+
:card_teaser_impressions, :card_teaser_clicks, :card_teaser_click_rate,
|
70
|
+
:playback_based_cpm, :annotation_close_rate, :earnings].each do |metric|
|
67
71
|
describe "#{metric} can be retrieved for a range of days" do
|
68
72
|
let(:date_in) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
|
69
73
|
let(:date_out) { Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5 }
|
@@ -118,6 +122,9 @@ describe Yt::Channel, :partner do
|
|
118
122
|
subscribers_gained: Integer, subscribers_lost: Integer,
|
119
123
|
estimated_minutes_watched: Integer, average_view_duration: Integer,
|
120
124
|
annotation_clicks: Integer, annotation_click_through_rate: Float,
|
125
|
+
card_impressions: Integer, card_clicks: Integer,
|
126
|
+
card_click_rate: Float, card_teaser_impressions: Integer,
|
127
|
+
card_teaser_clicks: Integer, card_teaser_click_rate: Float,
|
121
128
|
videos_added_to_playlists: Integer, videos_removed_from_playlists: Integer,
|
122
129
|
average_view_percentage: Float, impressions: Integer,
|
123
130
|
shares: Integer, playback_based_cpm: Float,
|
@@ -19,6 +19,8 @@ describe Yt::Video, :partner do
|
|
19
19
|
:estimated_minutes_watched, :average_view_duration,
|
20
20
|
:average_view_percentage, :impressions, :monetized_playbacks,
|
21
21
|
:annotation_clicks, :annotation_click_through_rate, :playback_based_cpm,
|
22
|
+
:card_impressions, :card_clicks, :card_click_rate,
|
23
|
+
:card_teaser_impressions, :card_teaser_clicks, :card_teaser_click_rate,
|
22
24
|
:annotation_close_rate, :earnings].each do |metric|
|
23
25
|
describe "#{metric} can be retrieved for a range of days" do
|
24
26
|
let(:date_in) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
|
@@ -116,6 +118,9 @@ describe Yt::Video, :partner do
|
|
116
118
|
average_view_percentage: Float, impressions: Integer,
|
117
119
|
monetized_playbacks: Integer, annotation_clicks: Integer,
|
118
120
|
annotation_click_through_rate: Float, annotation_close_rate: Float,
|
121
|
+
card_impressions: Integer, card_clicks: Integer,
|
122
|
+
card_click_rate: Float, card_teaser_impressions: Integer,
|
123
|
+
card_teaser_clicks: Integer, card_teaser_click_rate: Float,
|
119
124
|
earnings: Float}.each do |metric, type|
|
120
125
|
describe "#{metric} can be grouped by range" do
|
121
126
|
let(:metric) { metric }
|
@@ -143,6 +148,8 @@ describe Yt::Video, :partner do
|
|
143
148
|
:videos_added_to_playlists, :videos_removed_from_playlists,
|
144
149
|
:estimated_minutes_watched, :average_view_duration,
|
145
150
|
:average_view_percentage, :impressions, :monetized_playbacks,
|
151
|
+
:card_impressions, :card_clicks, :card_click_rate,
|
152
|
+
:card_teaser_impressions, :card_teaser_clicks, :card_teaser_click_rate,
|
146
153
|
:annotation_clicks, :annotation_click_through_rate,
|
147
154
|
:annotation_close_rate, :earnings].each do |metric|
|
148
155
|
describe "#{metric} can be retrieved for a single country" do
|
@@ -165,6 +172,8 @@ describe Yt::Video, :partner do
|
|
165
172
|
end
|
166
173
|
|
167
174
|
[:views, :annotation_clicks, :annotation_click_through_rate,
|
175
|
+
:card_impressions, :card_clicks, :card_click_rate,
|
176
|
+
:card_teaser_impressions, :card_teaser_clicks, :card_teaser_click_rate,
|
168
177
|
:annotation_close_rate].each do |metric|
|
169
178
|
describe "#{metric} can be retrieved for a single country" do
|
170
179
|
let(:result) { video.public_send metric, options }
|
@@ -193,6 +202,9 @@ describe Yt::Video, :partner do
|
|
193
202
|
videos_added_to_playlists: Integer, videos_removed_from_playlists: Integer,
|
194
203
|
average_view_duration: Integer,
|
195
204
|
average_view_percentage: Float, annotation_clicks: Integer,
|
205
|
+
card_impressions: Integer, card_clicks: Integer,
|
206
|
+
card_click_rate: Float, card_teaser_impressions: Integer,
|
207
|
+
card_teaser_clicks: Integer, card_teaser_click_rate: Float,
|
196
208
|
annotation_click_through_rate: Float,
|
197
209
|
annotation_close_rate: Float, earnings: Float, impressions: Integer,
|
198
210
|
monetized_playbacks: Integer}
|