yt 0.15.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54209e7c3dedc665ad4d6b0d93bcf6c6d9d6f546
4
- data.tar.gz: 6e09959e44cbf2aad7bcf29df8dfa25f6cc903c6
3
+ metadata.gz: 55d205cb0c564e1554416cc0342e78a3db861869
4
+ data.tar.gz: 847dc6cb07e91a609a599bf80076323bb4ed8da8
5
5
  SHA512:
6
- metadata.gz: 3a83c419303aa9980ecc4769c711798742aa0a3a77202ef04e18300ba32d414994f9e2b3fa6dd5042489e5b9caaca75966c4bdcfe1a3e1a995f641d176f5a89f
7
- data.tar.gz: 5f31bea6b6e1d473a42f73f2971efd7567220d0283c645b488ea6f35870be5e460352346996469179408f11fc9190ce61e17ce2ac435499ae89e732ead1e65b0
6
+ metadata.gz: aa186798f0c5e32c895d92a73b96f9db76eebf7377b1a7e7ebda53e9ef18c0ad4b48ee62aa3b987ef2baa96ad9a7a031b83c8b847bab803ea4b50c6c2de5115f
7
+ data.tar.gz: b6476451e5c3ead27bffa4e15ad4056387a9bcbf583dc37d0bce98b356a12b810ddf95046862151e0df23d7e24552a983f49433eb467a76360ed0f8f9893029a
@@ -6,6 +6,13 @@ 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
+
10
+ ## 0.15.1 - 2015-04-19
11
+
12
+ * [FEATURE] New `annotation clicks` report for videos and channels.
13
+ * [FEATURE] New `annotation click-through rate` report for videos and channels.
14
+ * [FEATURE] New `annotation close rate` report for videos and channels.
15
+
9
16
  ## 0.15.0 - 2015-04-19
10
17
 
11
18
  **How to upgrade**
data/README.md CHANGED
@@ -41,7 +41,7 @@ To install on your system, run
41
41
 
42
42
  To use inside a bundled Ruby project, add this line to the Gemfile:
43
43
 
44
- gem 'yt', '~> 0.15.0'
44
+ gem 'yt', '~> 0.15.1'
45
45
 
46
46
  Since the gem follows [Semantic Versioning](http://semver.org),
47
47
  indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
@@ -148,7 +148,7 @@ Use [Yt::Channel](http://rubydoc.info/github/Fullscreen/yt/master/Yt/Models/Chan
148
148
  * access the channels that the channel is subscribed to
149
149
  * subscribe to and unsubscribe from a channel
150
150
  * delete playlists from a channel
151
- * retrieve the daily earnings, views, comments, likes, dislikes, shares, subscribers gained/lost, estimated/average video watch and impressions of a channel by day
151
+ * retrieve the daily earnings, views, comments, likes, dislikes, shares, subscribers gained/lost, annotation clicks, annotation click-through rate, annotation close rate, estimated/average video watch and impressions of a channel by day
152
152
  * retrieve the views and estimated minutes watched by traffic source
153
153
  * retrieve the views and estimated minutes watched by playback location
154
154
  * retrieve the views and estimated minutes watched by embedded player location
@@ -215,6 +215,9 @@ channel.favorites_removed from: '2014-08-30', to: '2014-08-31' #=> {Sat, 30 Aug
215
215
  channel.estimated_minutes_watched #=> {Sun, 22 Feb 2015=>2433258.0, Mon, 23 Feb 2015=>2634360.0, …}
216
216
  channel.average_view_duration #=> {Sun, 22 Feb 2015=>329.0, Mon, 23 Feb 2015=>326.0, …}
217
217
  channel.average_view_percentage # {Sun, 22 Feb 2015=>38.858253094977265, Mon, 23 Feb 2015=>37.40014235438217, …}
218
+ channel.annotation_clicks #=> {Sun, 22 Feb 2015=>329.0, Mon, 23 Feb 2015=>326.0, …}
219
+ channel.annotation_click_through_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
220
+ channel.annotation_close_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
218
221
  channel.viewer_percentage #=> {female: {'18-24' => 12.12, '25-34' => 16.16,…}…}
219
222
 
220
223
  channel.views since: 7.days.ago, by: :traffic_source #=> {advertising: 10.0, related_video: 20.0, promoted: 5.0, subscriber: 1.0, channel: 3.0, other: 7.0}
@@ -257,6 +260,9 @@ channel.subscribers_lost from: '2014-08-30', to: '2014-08-31' #=> {Sat, 30 Aug 2
257
260
  channel.estimated_minutes_watched #=> {Sun, 22 Feb 2015=>2433258.0, Mon, 23 Feb 2015=>2634360.0, …}
258
261
  channel.average_view_duration #=> {Sun, 22 Feb 2015=>329.0, Mon, 23 Feb 2015=>326.0, …}
259
262
  channel.average_view_percentage # {Sun, 22 Feb 2015=>38.858253094977265, Mon, 23 Feb 2015=>37.40014235438217, …}
263
+ channel.annotation_clicks #=> {Sun, 22 Feb 2015=>329.0, Mon, 23 Feb 2015=>326.0, …}
264
+ channel.annotation_click_through_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
265
+ channel.annotation_close_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
260
266
  channel.viewer_percentage since: 7.days.ago #=> {female: {'18-24' => 12.12, '25-34' => 16.16,…}…}
261
267
 
262
268
  channel.views since: 7.days.ago, by: :traffic_source #=> {advertising: 10.0, related_video: 20.0, promoted: 5.0, subscriber: 1.0, channel: 3.0, other: 7.0}
@@ -294,7 +300,7 @@ Use [Yt::Video](http://rubydoc.info/github/Fullscreen/yt/master/Yt/Models/Video)
294
300
  * access the annotations of a video
295
301
  * delete a video
296
302
  * like and dislike a video
297
- * retrieve the daily earnings, views, comments, likes, dislikes, shares, subscribers gained/lost, impressions and monetized playbacks of a video by day
303
+ * retrieve the daily earnings, views, comments, likes, dislikes, shares, subscribers gained/lost, impressions, annotation clicks, annotation click-through rate, annotation close rate and monetized playbacks of a video by day
298
304
  * retrieve the views of a video by traffic source
299
305
  * retrieve the views of a video by playback location
300
306
  * retrieve the views of a video by embedded player location
@@ -397,6 +403,9 @@ video.favorites_removed from: '2014-08-30', to: '2014-08-31' #=> {Sat, 30 Aug 20
397
403
  video.average_view_duration #=> {Sun, 22 Feb 2015=>329.0, Mon, 23 Feb 2015=>326.0, …}
398
404
  video.average_view_percentage # {Sun, 22 Feb 2015=>38.858253094977265, Mon, 23 Feb 2015=>37.40014235438217, …}
399
405
  video.estimated_minutes_watched #=> {Sun, 22 Feb 2015=>2433258.0, Mon, 23 Feb 2015=>2634360.0, …}
406
+ video.annotation_clicks #=> {Sun, 22 Feb 2015=>329.0, Mon, 23 Feb 2015=>326.0, …}
407
+ video.annotation_click_through_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
408
+ video.annotation_close_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
400
409
  video.viewer_percentage #=> {female: {'18-24' => 12.12, '25-34' => 16.16,…}…}
401
410
 
402
411
  video.views since: 7.days.ago, by: :traffic_source #=> {advertising: 10.0, related_video: 20.0, promoted: 5.0, subscriber: 1.0, channel: 3.0, other: 7.0}
@@ -431,6 +440,9 @@ video.average_view_percentage # {Sun, 22 Feb 2015=>38.858253094977265, Mon, 23 F
431
440
  video.estimated_minutes_watched #=> {Sun, 22 Feb 2015=>2433258.0, Mon, 23 Feb 2015=>2634360.0, …}
432
441
  video.impressions_on 5.days.ago #=> 157.0
433
442
  video.monetized_playbacks_on 5.days.ago #=> 123.0
443
+ video.annotation_clicks #=> {Sun, 22 Feb 2015=>329.0, Mon, 23 Feb 2015=>326.0, …}
444
+ video.annotation_click_through_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
445
+ video.annotation_close_rate #=> {Sun, 22 Feb 2015=>0.02, Mon, 23 Feb 2015=>0.03, …}
434
446
  video.viewer_percentage #=> {female: {'18-24' => 12.12, '25-34' => 16.16,…}…}
435
447
 
436
448
  video.views since: 7.days.ago, by: :traffic_source #=> {advertising: 10.0, related_video: 20.0, promoted: 5.0, subscriber: 1.0, channel: 3.0, other: 7.0}
@@ -58,6 +58,15 @@ module Yt
58
58
  # @macro has_report
59
59
  has_report :monetized_playbacks
60
60
 
61
+ # @macro has_report
62
+ has_report :annotation_clicks
63
+
64
+ # @macro has_report
65
+ has_report :annotation_click_through_rate
66
+
67
+ # @macro has_report
68
+ has_report :annotation_close_rate
69
+
61
70
  # @macro has_report
62
71
  has_report :viewer_percentage
63
72
 
@@ -89,6 +89,15 @@ module Yt
89
89
  # @macro has_report
90
90
  has_report :monetized_playbacks
91
91
 
92
+ # @macro has_report
93
+ has_report :annotation_clicks
94
+
95
+ # @macro has_report
96
+ has_report :annotation_click_through_rate
97
+
98
+ # @macro has_report
99
+ has_report :annotation_close_rate
100
+
92
101
  # @macro has_report
93
102
  has_report :viewer_percentage
94
103
 
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.15.0'
2
+ VERSION = '0.15.1'
3
3
  end
@@ -175,6 +175,9 @@ describe Yt::Channel, :device_app do
175
175
  expect{channel.estimated_minutes_watched}.not_to raise_error
176
176
  expect{channel.average_view_duration}.not_to raise_error
177
177
  expect{channel.average_view_percentage}.not_to raise_error
178
+ expect{channel.annotation_clicks}.not_to raise_error
179
+ expect{channel.annotation_click_through_rate}.not_to raise_error
180
+ expect{channel.annotation_close_rate}.not_to raise_error
178
181
  expect{channel.viewer_percentage}.not_to raise_error
179
182
  expect{channel.earnings}.to raise_error Yt::Errors::Unauthorized
180
183
  expect{channel.impressions}.to raise_error Yt::Errors::Unauthorized
@@ -292,6 +292,9 @@ describe Yt::Video, :device_app do
292
292
  expect{video.estimated_minutes_watched}.not_to raise_error
293
293
  expect{video.average_view_duration}.not_to raise_error
294
294
  expect{video.average_view_percentage}.not_to raise_error
295
+ expect{video.annotation_clicks}.not_to raise_error
296
+ expect{video.annotation_click_through_rate}.not_to raise_error
297
+ expect{video.annotation_close_rate}.not_to raise_error
295
298
  expect{video.viewer_percentage}.not_to raise_error
296
299
  expect{video.earnings}.to raise_error Yt::Errors::Unauthorized
297
300
  expect{video.impressions}.to raise_error Yt::Errors::Unauthorized
@@ -845,6 +845,87 @@ describe Yt::Channel, :partner do
845
845
  end
846
846
  end
847
847
 
848
+ describe 'annotation clicks can be retrieved for a range of days' do
849
+ let(:date) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
850
+ let(:date_to) { Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5 }
851
+
852
+ specify 'with a given start (:since option) and a given end (:until option)' do
853
+ expect(channel.annotation_clicks(since: date, until: date_to).keys.min).to eq date.to_date
854
+ end
855
+
856
+ specify 'with a given start (:from option) and a given end (:to option)' do
857
+ expect(channel.annotation_clicks(from: date, to: date_to).keys.min).to eq date.to_date
858
+ end
859
+ end
860
+
861
+ describe 'annotation clicks can be grouped by day' do
862
+ let(:range) { {since: ENV['YT_TEST_PARTNER_VIDEO_DATE'], until: Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5} }
863
+
864
+ specify 'without a :by option (default)' do
865
+ annotation_clicks = channel.annotation_clicks range
866
+ expect(annotation_clicks.values).to all(be_instance_of Float)
867
+ end
868
+
869
+ specify 'with the :by option set to :day' do
870
+ annotation_clicks = channel.annotation_clicks range.merge by: :day
871
+ expect(annotation_clicks.values).to all(be_instance_of Float)
872
+ end
873
+ end
874
+
875
+ describe 'annotation click-through rate can be retrieved for a range of days' do
876
+ let(:date) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
877
+ let(:date_to) { Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5 }
878
+
879
+ specify 'with a given start (:since option) and a given end (:until option)' do
880
+ expect(channel.annotation_click_through_rate(since: date, until: date_to).keys.min).to eq date.to_date
881
+ end
882
+
883
+ specify 'with a given start (:from option) and a given end (:to option)' do
884
+ expect(channel.annotation_click_through_rate(from: date, to: date_to).keys.min).to eq date.to_date
885
+ end
886
+ end
887
+
888
+ describe 'annotation click-through rate can be grouped by day' do
889
+ let(:range) { {since: ENV['YT_TEST_PARTNER_VIDEO_DATE'], until: Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5} }
890
+
891
+ specify 'without a :by option (default)' do
892
+ annotation_click_through_rate = channel.annotation_click_through_rate range
893
+ expect(annotation_click_through_rate.values).to all(be_instance_of Float)
894
+ end
895
+
896
+ specify 'with the :by option set to :day' do
897
+ annotation_click_through_rate = channel.annotation_click_through_rate range.merge by: :day
898
+ expect(annotation_click_through_rate.values).to all(be_instance_of Float)
899
+ end
900
+ end
901
+
902
+ describe 'annotation close rate can be retrieved for a range of days' do
903
+ let(:date) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
904
+ let(:date_to) { Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5 }
905
+
906
+ specify 'with a given start (:since option) and a given end (:until option)' do
907
+ expect(channel.annotation_close_rate(since: date, until: date_to).keys.min).to eq date.to_date
908
+ end
909
+
910
+ specify 'with a given start (:from option) and a given end (:to option)' do
911
+ expect(channel.annotation_close_rate(from: date, to: date_to).keys.min).to eq date.to_date
912
+ end
913
+ end
914
+
915
+ describe 'annotation close rate can be grouped by day' do
916
+ let(:range) { {since: ENV['YT_TEST_PARTNER_VIDEO_DATE'], until: Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5} }
917
+
918
+ specify 'without a :by option (default)' do
919
+ annotation_close_rate = channel.annotation_close_rate range
920
+ expect(annotation_close_rate.values).to all(be_instance_of Float)
921
+ end
922
+
923
+ specify 'with the :by option set to :day' do
924
+ annotation_close_rate = channel.annotation_close_rate range.merge by: :day
925
+ expect(annotation_close_rate.values).to all(be_instance_of Float)
926
+ end
927
+ end
928
+
848
929
  describe 'viewer percentage can be retrieved for a range of days' do
849
930
  let(:viewer_percentage) { channel.viewer_percentage since: 1.year.ago, until: 10.days.ago}
850
931
  it { expect(viewer_percentage).to be_a Hash }
@@ -753,6 +753,87 @@ describe Yt::Video, :partner do
753
753
  end
754
754
  end
755
755
 
756
+ describe 'annotation clicks can be retrieved for a range of days' do
757
+ let(:date) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
758
+ let(:date_to) { Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5 }
759
+
760
+ specify 'with a given start (:since option) and a given end (:until option)' do
761
+ expect(video.annotation_clicks(since: date, until: date_to).keys.min).to eq date.to_date
762
+ end
763
+
764
+ specify 'with a given start (:from option) and a given end (:to option)' do
765
+ expect(video.annotation_clicks(from: date, to: date_to).keys.min).to eq date.to_date
766
+ end
767
+ end
768
+
769
+ describe 'annotation clicks can be grouped by day' do
770
+ let(:range) { {since: ENV['YT_TEST_PARTNER_VIDEO_DATE'], until: Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5} }
771
+
772
+ specify 'without a :by option (default)' do
773
+ annotation_clicks = video.annotation_clicks range
774
+ expect(annotation_clicks.values).to all(be_instance_of Float)
775
+ end
776
+
777
+ specify 'with the :by option set to :day' do
778
+ annotation_clicks = video.annotation_clicks range.merge by: :day
779
+ expect(annotation_clicks.values).to all(be_instance_of Float)
780
+ end
781
+ end
782
+
783
+ describe 'annotation click-through rate can be retrieved for a range of days' do
784
+ let(:date) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
785
+ let(:date_to) { Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5 }
786
+
787
+ specify 'with a given start (:since option) and a given end (:until option)' do
788
+ expect(video.annotation_click_through_rate(since: date, until: date_to).keys.min).to eq date.to_date
789
+ end
790
+
791
+ specify 'with a given start (:from option) and a given end (:to option)' do
792
+ expect(video.annotation_click_through_rate(from: date, to: date_to).keys.min).to eq date.to_date
793
+ end
794
+ end
795
+
796
+ describe 'annotation click-through rate can be grouped by day' do
797
+ let(:range) { {since: ENV['YT_TEST_PARTNER_VIDEO_DATE'], until: Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5} }
798
+
799
+ specify 'without a :by option (default)' do
800
+ annotation_click_through_rate = video.annotation_click_through_rate range
801
+ expect(annotation_click_through_rate.values).to all(be_instance_of Float)
802
+ end
803
+
804
+ specify 'with the :by option set to :day' do
805
+ annotation_click_through_rate = video.annotation_click_through_rate range.merge by: :day
806
+ expect(annotation_click_through_rate.values).to all(be_instance_of Float)
807
+ end
808
+ end
809
+
810
+ describe 'annotation close rate can be retrieved for a range of days' do
811
+ let(:date) { ENV['YT_TEST_PARTNER_VIDEO_DATE'] }
812
+ let(:date_to) { Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5 }
813
+
814
+ specify 'with a given start (:since option) and a given end (:until option)' do
815
+ expect(video.annotation_close_rate(since: date, until: date_to).keys.min).to eq date.to_date
816
+ end
817
+
818
+ specify 'with a given start (:from option) and a given end (:to option)' do
819
+ expect(video.annotation_close_rate(from: date, to: date_to).keys.min).to eq date.to_date
820
+ end
821
+ end
822
+
823
+ describe 'annotation close rate can be grouped by day' do
824
+ let(:range) { {since: ENV['YT_TEST_PARTNER_VIDEO_DATE'], until: Date.parse(ENV['YT_TEST_PARTNER_VIDEO_DATE']) + 5} }
825
+
826
+ specify 'without a :by option (default)' do
827
+ annotation_close_rate = video.annotation_close_rate range
828
+ expect(annotation_close_rate.values).to all(be_instance_of Float)
829
+ end
830
+
831
+ specify 'with the :by option set to :day' do
832
+ annotation_close_rate = video.annotation_close_rate range.merge by: :day
833
+ expect(annotation_close_rate.values).to all(be_instance_of Float)
834
+ end
835
+ end
836
+
756
837
  describe 'viewer percentage can be retrieved for a range of days' do
757
838
  let(:viewer_percentage) { video.viewer_percentage since: 1.year.ago, until: 10.days.ago}
758
839
  it { expect(viewer_percentage).to be_a Hash }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo