yt 0.32.1 → 0.32.2

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
- SHA1:
3
- metadata.gz: 9b8170d3a7debea512ed16ea94625623a4189a93
4
- data.tar.gz: eaa9f9146b89cb1bf686176299433c57d8ca0c64
2
+ SHA256:
3
+ metadata.gz: 42cfba8fbb240b3272678d965ba64987563a9a2a2a8ae839a22df6a764722ae3
4
+ data.tar.gz: e81d7bb9c2cd64ae4fdc9d68dae7a39ae7ff2b0f3ffea3dc27a52103f8a21ec7
5
5
  SHA512:
6
- metadata.gz: 0a7892632cc6eb1660a675736690ea4efa55f77af26dcbd9e1c9a657662925b352b714a0da14ab95fa842908b89ecca7b01b48adcccbe277ec5e79473b2f3698
7
- data.tar.gz: 811a28e571213a03359b3b1fbeb2c8d0498a664196238594c91e0f0de4ae5000d524356c631d3f84e36a76e0c226117f0026bd4123bdfbee3dc9a1bdbe617111
6
+ metadata.gz: a2cbb015d4d363ca40d9238bffabd618edc534f250097ab58548a2f2676334a419dfe8cac893b282063fe03373a1b71f055f90f972d2489ce6e69e81237727f7
7
+ data.tar.gz: e0bb039d9acfbfb4d2403ffbad549dba4fa359ab9467a6faeed1ff6fe6137adf5dd8c307dbb025f8e4e7a8dc4cb3204a9ef78aff1ca8cfb77fc44ea4197b9fd2
@@ -6,6 +6,11 @@ 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
+
9
14
  ## 0.32.1 - 2017-08-14
10
15
 
11
16
  * [FEATURE] Add `Yt::ContentOwner#bulk_report_jobs`
@@ -14,7 +14,8 @@ module Yt
14
14
 
15
15
  def list_params
16
16
  super.tap do |params|
17
- params[:path] = "/youtube/analytics/v1/groups"
17
+ params[:host] = 'youtubeanalytics.googleapis.com'
18
+ params[:path] = "/v2/groups"
18
19
  params[:params] = {id: @parent.id}
19
20
  if @auth.owner_name
20
21
  params[:params][:on_behalf_of_content_owner] = @auth.owner_name
@@ -23,4 +24,4 @@ module Yt
23
24
  end
24
25
  end
25
26
  end
26
- end
27
+ end
@@ -16,7 +16,8 @@ module Yt
16
16
 
17
17
  def list_params
18
18
  super.tap do |params|
19
- params[:path] = "/youtube/analytics/v1/groupItems"
19
+ params[:host] = 'youtubeanalytics.googleapis.com'
20
+ params[:path] = "/v2/groupItems"
20
21
  params[:params] = {group_id: @parent.id}
21
22
  if @auth.owner_name
22
23
  params[:params][:on_behalf_of_content_owner] = @auth.owner_name
@@ -177,7 +177,8 @@ module Yt
177
177
  # @see https://developers.google.com/youtube/analytics/v1/content_owner_reports
178
178
  def list_params
179
179
  super.tap do |params|
180
- params[:path] = '/youtube/analytics/v1/reports'
180
+ params[:host] = 'youtubeanalytics.googleapis.com'
181
+ params[:path] = '/v2/reports'
181
182
  params[:params] = reports_params
182
183
  params[:camelize_params] = false
183
184
  end
@@ -185,13 +186,13 @@ module Yt
185
186
 
186
187
  def reports_params
187
188
  @parent.reports_params.tap do |params|
188
- params['start-date'] = @days_range.begin
189
- params['end-date'] = @days_range.end
189
+ params['startDate'] = @days_range.begin
190
+ params['endDate'] = @days_range.end
190
191
  params['metrics'] = @metrics.keys.join(',').to_s.camelize(:lower)
191
192
  params['dimensions'] = DIMENSIONS[@dimension][:name] unless @dimension == :range
192
- params['include-historical-channel-data'] = @historical if @historical
193
- params['max-results'] = 50 if @dimension.in? [:playlist, :video]
194
- params['max-results'] = 25 if @dimension.in? [:embedded_player_location, :related_video, :search_term, :referrer]
193
+ params['includeHistoricalChannelData'] = @historical if @historical
194
+ params['maxResults'] = 50 if @dimension.in? [:playlist, :video]
195
+ params['maxResults'] = 25 if @dimension.in? [:embedded_player_location, :related_video, :search_term, :referrer]
195
196
  if @dimension.in? [:video, :playlist, :embedded_player_location, :related_video, :search_term, :referrer]
196
197
  if @metrics.keys == [:estimated_revenue, :estimated_minutes_watched]
197
198
  params['sort'] = '-estimatedRevenue'
@@ -19,7 +19,8 @@ module Yt
19
19
 
20
20
  def list_params
21
21
  super.tap do |params|
22
- params[:path] = "/youtube/analytics/v1/groups"
22
+ params[:host] = 'youtubeanalytics.googleapis.com'
23
+ params[:path] = "/v2/groups"
23
24
  params[:params] = @parent.video_groups_params
24
25
  end
25
26
  end
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.32.1'
2
+ VERSION = '0.32.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.1
4
+ version: 0.32.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-15 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -342,7 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
342
342
  version: '0'
343
343
  requirements: []
344
344
  rubyforge_project:
345
- rubygems_version: 2.6.12
345
+ rubygems_version: 2.7.6
346
346
  signing_key:
347
347
  specification_version: 4
348
348
  summary: Yt makes it easy to interact with Youtube V3 API by providing a modular,