brainzz 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c3b7c8a7a3823fe06e1f4b09a528d6f9772f6f7
4
- data.tar.gz: 9f415ab84b1f27e291c414a7832a3b72ecc751e4
3
+ metadata.gz: cfca768023db96bcf04d099f4298073dcfa40b54
4
+ data.tar.gz: b0c14ae5ecfd6e20ee7dffa84fe1529811753cb2
5
5
  SHA512:
6
- metadata.gz: 5ee2a8f8a1b3fe7d5f2e18b3bd5e6e50bcdb67a2daef4d37d361f0d5f4e304f01d601cd71c4d18cd1c92cdcbab99c9e4111a9eb60d631887d851f2c5940f4456
7
- data.tar.gz: 46fbc04ae7d163b4c03388aff58d006fd47bcb44fddd35b9eb2298081d30dfdd63309c8b25db8d1457b2b6d17c1d3c249a5ef673de4db9aeaa4396f5b41da523
6
+ metadata.gz: 7dad56f65140844c15f40ca1cca3b006fbcb0fb844c75769fe3061c5ed3ef3c636b4df849babb5f0b183db60bb590f21632e4e3d9619fd137bb9c56242551f8c
7
+ data.tar.gz: 02c4a242776826bf517457abfc3b4c0702623c9aa6e85d3116f9e7269f972b614a0a158750c81672ce0e9f5d3a9baf08e5f18c1790c0867fbbc509fe24bee398
@@ -25,6 +25,10 @@ require_relative 'brainzz/models/subscribers_lost_mixin'
25
25
  require_relative 'brainzz/models/subscribers_lost_count'
26
26
  require_relative 'brainzz/models/channel_subscribers_lost_count'
27
27
  require_relative 'brainzz/models/channel_subscribers_gained_count'
28
+ require_relative 'brainzz/models/channel_view_count'
29
+ require_relative 'brainzz/models/channel_like_count'
30
+ require_relative 'brainzz/models/channel_dislike_count'
31
+ require_relative 'brainzz/models/channel_comment_count'
28
32
  require_relative 'brainzz/models/annotations_clickable_count'
29
33
  require_relative 'brainzz/models/annotations_clicked_count'
30
34
  require_relative 'brainzz/models/view_percentage'
@@ -57,6 +61,10 @@ require_relative 'brainzz/responses/subscribers_gained_response'
57
61
  require_relative 'brainzz/responses/subscribers_lost_response'
58
62
  require_relative 'brainzz/responses/channel_subscribers_lost_response'
59
63
  require_relative 'brainzz/responses/channel_subscribers_gained_response'
64
+ require_relative 'brainzz/responses/channel_view_count_response'
65
+ require_relative 'brainzz/responses/channel_like_count_response'
66
+ require_relative 'brainzz/responses/channel_dislike_count_response'
67
+ require_relative 'brainzz/responses/channel_comment_count_response'
60
68
  require_relative 'brainzz/responses/annotations_clickable_response'
61
69
  require_relative 'brainzz/responses/annotations_clicked_response'
62
70
  require_relative 'brainzz/responses/view_percentage_response'
@@ -90,6 +98,14 @@ require_relative 'brainzz/commands/channel_subscribers_lost_totals_command'
90
98
  require_relative 'brainzz/commands/channel_subscribers_lost_by_day_command'
91
99
  require_relative 'brainzz/commands/channel_subscribers_gained_totals_command'
92
100
  require_relative 'brainzz/commands/channel_subscribers_gained_by_day_command'
101
+ require_relative 'brainzz/commands/channel_view_totals_command'
102
+ require_relative 'brainzz/commands/channel_view_count_by_day_command'
103
+ require_relative 'brainzz/commands/channel_like_totals_command'
104
+ require_relative 'brainzz/commands/channel_like_count_by_day_command'
105
+ require_relative 'brainzz/commands/channel_dislike_totals_command'
106
+ require_relative 'brainzz/commands/channel_dislike_count_by_day_command'
107
+ require_relative 'brainzz/commands/channel_comment_totals_command'
108
+ require_relative 'brainzz/commands/channel_comment_count_by_day_command'
93
109
  require_relative 'brainzz/commands/annotations_clickable_totals_command'
94
110
  require_relative 'brainzz/commands/annotations_clickable_by_day_command'
95
111
  require_relative 'brainzz/commands/annotations_clicked_totals_command'
@@ -0,0 +1,7 @@
1
+ module Brainzz
2
+ class ChannelCommentCountByDayCommand < ChannelCommentTotalsCommand
3
+ extend StatsByDayCommand
4
+
5
+ make_with_response ChannelCommentCountResponse
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ module Brainzz
2
+ class ChannelCommentTotalsCommand < ChannelStatsCommand
3
+ make_with_response ChannelCommentCountResponse
4
+
5
+ class << self
6
+ private
7
+
8
+ def params(channel_stats_params)
9
+ super.merge({
10
+ 'metrics' => 'comments',
11
+ })
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ module Brainzz
2
+ class ChannelDislikeCountByDayCommand < ChannelDislikeTotalsCommand
3
+ extend StatsByDayCommand
4
+
5
+ make_with_response ChannelDislikeCountResponse
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ module Brainzz
2
+ class ChannelDislikeTotalsCommand < ChannelStatsCommand
3
+ make_with_response ChannelDislikeCountResponse
4
+
5
+ class << self
6
+ private
7
+
8
+ def params(channel_stats_params)
9
+ super.merge({
10
+ 'metrics' => 'dislikes',
11
+ })
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ module Brainzz
2
+ class ChannelLikeCountByDayCommand < ChannelLikeTotalsCommand
3
+ extend StatsByDayCommand
4
+
5
+ make_with_response ChannelLikeCountResponse
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ module Brainzz
2
+ class ChannelLikeTotalsCommand < ChannelStatsCommand
3
+ make_with_response ChannelLikeCountResponse
4
+
5
+ class << self
6
+ private
7
+
8
+ def params(channel_stats_params)
9
+ super.merge({
10
+ 'metrics' => 'likes',
11
+ })
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ module Brainzz
2
+ class ChannelViewCountByDayCommand < ChannelViewTotalsCommand
3
+ extend StatsByDayCommand
4
+
5
+ make_with_response ChannelViewCountResponse
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ module Brainzz
2
+ class ChannelViewTotalsCommand < ChannelStatsCommand
3
+ make_with_response ChannelViewCountResponse
4
+
5
+ class << self
6
+ private
7
+
8
+ def params(channel_stats_params)
9
+ super.merge({
10
+ 'metrics' => 'views',
11
+ })
12
+ end
13
+ end
14
+ end
15
+ end
@@ -121,5 +121,45 @@ module Brainzz
121
121
  ChannelSubscribersGainedTotalsCommand
122
122
  .execute channel_ids, start_date, end_date
123
123
  end
124
+
125
+ def channel_view_by_day_for(channel_ids, start_date, end_date)
126
+ ChannelViewCountByDayCommand
127
+ .execute channel_ids, start_date, end_date
128
+ end
129
+
130
+ def channel_view_totals_for(channel_ids, start_date, end_date)
131
+ ChannelViewCountTotalsCommand
132
+ .execute channel_ids, start_date, end_date
133
+ end
134
+
135
+ def channel_like_by_day_for(channel_ids, start_date, end_date)
136
+ ChannelLikeCountByDayCommand
137
+ .execute channel_ids, start_date, end_date
138
+ end
139
+
140
+ def channel_like_totals_for(channel_ids, start_date, end_date)
141
+ ChannelLikeCountTotalsCommand
142
+ .execute channel_ids, start_date, end_date
143
+ end
144
+
145
+ def channel_dislike_by_day_for(channel_ids, start_date, end_date)
146
+ ChannelDislikeCountByDayCommand
147
+ .execute channel_ids, start_date, end_date
148
+ end
149
+
150
+ def channel_dislike_totals_for(channel_ids, start_date, end_date)
151
+ ChannelDislikeCountTotalsCommand
152
+ .execute channel_ids, start_date, end_date
153
+ end
154
+
155
+ def channel_comment_by_day_for(channel_ids, start_date, end_date)
156
+ ChannelCommentCountByDayCommand
157
+ .execute channel_ids, start_date, end_date
158
+ end
159
+
160
+ def channel_comment_totals_for(channel_ids, start_date, end_date)
161
+ ChannelCommentCountTotalsCommand
162
+ .execute channel_ids, start_date, end_date
163
+ end
124
164
  end
125
165
  end
@@ -0,0 +1,16 @@
1
+ module Brainzz
2
+ class ChannelCommentCount < ChannelStat
3
+ attr_accessor :comments
4
+
5
+ def initialize(hash)
6
+ super
7
+ @comments = normalize_stat(comments_data)
8
+ end
9
+
10
+ private
11
+
12
+ def comments_data
13
+ data && keys['comments'] && data[keys['comments']]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module Brainzz
2
+ class ChannelDislikeCount < ChannelStat
3
+ attr_accessor :dislikes
4
+
5
+ def initialize(hash)
6
+ super
7
+ @dislikes = normalize_stat(dislikes_data)
8
+ end
9
+
10
+ private
11
+
12
+ def dislikes_data
13
+ data && keys['dislikes'] && data[keys['dislikes']]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module Brainzz
2
+ class ChannelLikeCount < ChannelStat
3
+ attr_accessor :likes
4
+
5
+ def initialize(hash)
6
+ super
7
+ @likes = normalize_stat(likes_data)
8
+ end
9
+
10
+ private
11
+
12
+ def likes_data
13
+ data && keys['likes'] && data[keys['likes']]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ module Brainzz
2
+ class ChannelViewCount < ChannelStat
3
+ attr_accessor :views
4
+
5
+ def initialize(hash)
6
+ super
7
+ @views = normalize_stat(views_data)
8
+ end
9
+
10
+ private
11
+
12
+ def views_data
13
+ data && keys['views'] && data[keys['views']]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module Brainzz
2
+ class ChannelCommentCountResponse < VideoStatsResponse
3
+ make_with_model ChannelCommentCount
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Brainzz
2
+ class ChannelDislikeCountResponse < VideoStatsResponse
3
+ make_with_model ChannelDislikeCount
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Brainzz
2
+ class ChannelLikeCountResponse < VideoStatsResponse
3
+ make_with_model ChannelLikeCount
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Brainzz
2
+ class ChannelViewCountResponse < VideoStatsResponse
3
+ make_with_model ChannelViewCount
4
+ end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainzz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Herrick
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-07-22 00:00:00.000000000 Z
13
+ date: 2015-07-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -184,12 +184,20 @@ files:
184
184
  - lib/brainzz/commands/annotations_clicked_by_day_command.rb
185
185
  - lib/brainzz/commands/annotations_clicked_totals_command.rb
186
186
  - lib/brainzz/commands/base_command.rb
187
+ - lib/brainzz/commands/channel_comment_count_by_day_command.rb
188
+ - lib/brainzz/commands/channel_comment_totals_command.rb
187
189
  - lib/brainzz/commands/channel_details_command.rb
190
+ - lib/brainzz/commands/channel_dislike_count_by_day_command.rb
191
+ - lib/brainzz/commands/channel_dislike_totals_command.rb
192
+ - lib/brainzz/commands/channel_like_count_by_day_command.rb
193
+ - lib/brainzz/commands/channel_like_totals_command.rb
188
194
  - lib/brainzz/commands/channel_stats_command.rb
189
195
  - lib/brainzz/commands/channel_subscribers_gained_by_day_command.rb
190
196
  - lib/brainzz/commands/channel_subscribers_gained_totals_command.rb
191
197
  - lib/brainzz/commands/channel_subscribers_lost_by_day_command.rb
192
198
  - lib/brainzz/commands/channel_subscribers_lost_totals_command.rb
199
+ - lib/brainzz/commands/channel_view_count_by_day_command.rb
200
+ - lib/brainzz/commands/channel_view_totals_command.rb
193
201
  - lib/brainzz/commands/comment_count_by_day_command.rb
194
202
  - lib/brainzz/commands/comment_totals_command.rb
195
203
  - lib/brainzz/commands/data_command.rb
@@ -236,9 +244,13 @@ files:
236
244
  - lib/brainzz/models/annotations_clicked_count.rb
237
245
  - lib/brainzz/models/base_model.rb
238
246
  - lib/brainzz/models/channel.rb
247
+ - lib/brainzz/models/channel_comment_count.rb
248
+ - lib/brainzz/models/channel_dislike_count.rb
249
+ - lib/brainzz/models/channel_like_count.rb
239
250
  - lib/brainzz/models/channel_stat.rb
240
251
  - lib/brainzz/models/channel_subscribers_gained_count.rb
241
252
  - lib/brainzz/models/channel_subscribers_lost_count.rb
253
+ - lib/brainzz/models/channel_view_count.rb
242
254
  - lib/brainzz/models/comment_count.rb
243
255
  - lib/brainzz/models/dislike_count.rb
244
256
  - lib/brainzz/models/like_count.rb
@@ -265,9 +277,13 @@ files:
265
277
  - lib/brainzz/params/video_stats_params.rb
266
278
  - lib/brainzz/responses/annotations_clickable_response.rb
267
279
  - lib/brainzz/responses/annotations_clicked_response.rb
280
+ - lib/brainzz/responses/channel_comment_count_response.rb
268
281
  - lib/brainzz/responses/channel_details_response.rb
282
+ - lib/brainzz/responses/channel_dislike_count_response.rb
283
+ - lib/brainzz/responses/channel_like_count_response.rb
269
284
  - lib/brainzz/responses/channel_subscribers_gained_response.rb
270
285
  - lib/brainzz/responses/channel_subscribers_lost_response.rb
286
+ - lib/brainzz/responses/channel_view_count_response.rb
271
287
  - lib/brainzz/responses/comment_count_response.rb
272
288
  - lib/brainzz/responses/details_response.rb
273
289
  - lib/brainzz/responses/dislike_count_response.rb