yt 0.33.3 → 0.34.0
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 +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +7 -7
- data/bin/console +15 -0
- data/lib/yt/actions/list.rb +1 -2
- data/lib/yt/associations/has_authentication.rb +4 -2
- data/lib/yt/collections/authentications.rb +2 -2
- data/lib/yt/collections/captions.rb +30 -0
- data/lib/yt/collections/device_flows.rb +3 -2
- data/lib/yt/collections/revocations.rb +4 -4
- data/lib/yt/collections/user_infos.rb +2 -2
- data/lib/yt/models/account.rb +14 -5
- data/lib/yt/models/caption.rb +19 -0
- data/lib/yt/models/channel.rb +19 -0
- data/lib/yt/models/content_owner.rb +1 -1
- data/lib/yt/models/playlist.rb +0 -4
- data/lib/yt/models/snippet.rb +5 -0
- data/lib/yt/models/statistics_set.rb +5 -0
- data/lib/yt/models/status.rb +3 -1
- data/lib/yt/models/video.rb +21 -2
- data/lib/yt/request.rb +1 -2
- data/lib/yt/version.rb +1 -1
- data/lib/yt.rb +1 -0
- data/yt.gemspec +7 -7
- metadata +8 -33
- data/lib/yt/models/iterator.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33ad5cd77351556b82e952d8475b978539d34cb7b82731f60b91dc000fd675ce
|
4
|
+
data.tar.gz: 373db01c5faa0076ea61b9e30f81f7959505ea423026dcc2aba227f8f6aacc13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cb261d97cba17e75a42c49420784917bea7a9f6c257f08f928463db81f34784fce53c844d5744c6e72001bb4a600b94cef6592fd2e8ebc368118c5bcec1cb5b
|
7
|
+
data.tar.gz: 8af926d7f3341c7f3ffdd1b6a71554470fcd13d6fa7710e666eacf2e9968c76efedb5cdbf603ab792c0f076497fafa8e64364cb2a8355ad6b4475218950069b6
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,23 @@ 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.34.0 - 2024-08-25
|
10
|
+
|
11
|
+
* Ruby 2.1+ required https://github.com/nullscreen/yt/pull/425
|
12
|
+
* [IMPROVEMENT] Use new oauth2 endpoints https://github.com/nullscreen/yt/pull/422
|
13
|
+
* [REMOVAL] Remove `Playlist#tags` as 'snippet.tags[]' deprecated https://github.com/nullscreen/yt/pull/421
|
14
|
+
* [FEATURE] Add captions associated with a video https://github.com/nullscreen/yt/pull/419
|
15
|
+
* [BUGFIX] Remove dependency on the deprecated open-uri in Ruby 3 https://github.com/nullscreen/yt/pull/412 (thank you @kalemi19)
|
16
|
+
|
17
|
+
**Breaking change**
|
18
|
+
|
19
|
+
If your code runs on version of Ruby 2.1 or earlier, it will not be supported.
|
20
|
+
Please make sure to upgrade Ruby version to later than 2.1 before upgrade Yt.
|
21
|
+
|
22
|
+
## 0.33.4 - 2021-01-15
|
23
|
+
|
24
|
+
* [REMOVAL] remove retry for quota errors
|
25
|
+
|
9
26
|
## 0.33.3 - 2020-11-17
|
10
27
|
|
11
28
|
* [BUGFIX] require the `URL` model when requiring `yt`
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ To install on your system, run
|
|
43
43
|
|
44
44
|
To use inside a bundled Ruby project, add this line to the Gemfile:
|
45
45
|
|
46
|
-
gem 'yt', '~> 0.
|
46
|
+
gem 'yt', '~> 0.34.0'
|
47
47
|
|
48
48
|
Since the gem follows [Semantic Versioning](http://semver.org),
|
49
49
|
indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
|
@@ -56,7 +56,7 @@ Available resources
|
|
56
56
|
Yt::Account
|
57
57
|
-----------
|
58
58
|
|
59
|
-
Check [
|
59
|
+
Check [nullscreen.github.io/yt](http://nullscreen.github.io/yt/accounts.html) for the list of methods available for `Yt::Account`.
|
60
60
|
|
61
61
|
|
62
62
|
Yt::ContentOwner
|
@@ -109,22 +109,22 @@ content_owner.assets.first.custom_id #=> "MoKNJFOIRroc"
|
|
109
109
|
Yt::Channel
|
110
110
|
-----------
|
111
111
|
|
112
|
-
Check [
|
112
|
+
Check [nullscreen.github.io/yt](http://nullscreen.github.io/yt/channels.html) for the list of methods available for `Yt::Channel`.
|
113
113
|
|
114
114
|
Yt::Video
|
115
115
|
---------
|
116
116
|
|
117
|
-
Check [
|
117
|
+
Check [nullscreen.github.io/yt](http://nullscreen.github.io/yt/videos.html) for the list of methods available for `Yt::Video`.
|
118
118
|
|
119
119
|
Yt::Playlist
|
120
120
|
------------
|
121
121
|
|
122
|
-
Check [
|
122
|
+
Check [nullscreen.github.io/yt](http://nullscreen.github.io/yt/playlists.html) for the list of methods available for `Yt::Playlist`.
|
123
123
|
|
124
124
|
Yt::PlaylistItem
|
125
125
|
----------------
|
126
126
|
|
127
|
-
Check [
|
127
|
+
Check [nullscreen.github.io/yt](http://nullscreen.github.io/yt/playlist_items.html) for the list of methods available for `Yt::PlaylistItem`.
|
128
128
|
|
129
129
|
Yt::CommentThread
|
130
130
|
----------------
|
@@ -217,7 +217,7 @@ videos.where(id: 'jNQXAC9IVRw,invalid').map(&:title) #=> ["Fullscreen Creator Pl
|
|
217
217
|
Yt::Annotation
|
218
218
|
--------------
|
219
219
|
|
220
|
-
Check [
|
220
|
+
Check [nullscreen.github.io/yt](http://nullscreen.github.io/yt/annotations.html) for the list of methods available for `Yt::Annotation`.
|
221
221
|
|
222
222
|
|
223
223
|
Yt::MatchPolicy
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "yt"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
require "pry"
|
12
|
+
Pry.start
|
13
|
+
|
14
|
+
# require "irb"
|
15
|
+
# IRB.start(__FILE__)
|
data/lib/yt/actions/list.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'yt/request'
|
2
|
-
require 'yt/models/iterator'
|
3
2
|
require 'yt/errors/no_items'
|
4
3
|
require 'yt/config'
|
5
4
|
|
@@ -17,7 +16,7 @@ module Yt
|
|
17
16
|
|
18
17
|
def list
|
19
18
|
@last_index, @page_token = 0, nil
|
20
|
-
|
19
|
+
Enumerator.new(-> {total_results}) do |items|
|
21
20
|
while next_item = find_next
|
22
21
|
items << next_item
|
23
22
|
end
|
@@ -32,6 +32,7 @@ module Yt
|
|
32
32
|
@force = options[:force]
|
33
33
|
@scopes = options[:scopes]
|
34
34
|
@authentication = options[:authentication]
|
35
|
+
@state = options[:state]
|
35
36
|
end
|
36
37
|
|
37
38
|
def auth
|
@@ -48,7 +49,7 @@ module Yt
|
|
48
49
|
|
49
50
|
def authentication_url
|
50
51
|
host = 'accounts.google.com'
|
51
|
-
path = '/o/oauth2/auth'
|
52
|
+
path = '/o/oauth2/v2/auth'
|
52
53
|
query = authentication_url_params.to_param
|
53
54
|
URI::HTTPS.build(host: host, path: path, query: query).to_s
|
54
55
|
end
|
@@ -190,6 +191,7 @@ module Yt
|
|
190
191
|
params[:access_type] = :offline
|
191
192
|
params[:approval_prompt] = @force ? :force : :auto
|
192
193
|
# params[:include_granted_scopes] = true
|
194
|
+
params[:state] = @state if @state
|
193
195
|
end
|
194
196
|
end
|
195
197
|
|
@@ -243,4 +245,4 @@ module Yt
|
|
243
245
|
end
|
244
246
|
end
|
245
247
|
end
|
246
|
-
end
|
248
|
+
end
|
@@ -16,8 +16,8 @@ module Yt
|
|
16
16
|
|
17
17
|
def list_params
|
18
18
|
super.tap do |params|
|
19
|
-
params[:host] = '
|
20
|
-
params[:path] = '/
|
19
|
+
params[:host] = 'oauth2.googleapis.com'
|
20
|
+
params[:path] = '/token'
|
21
21
|
params[:request_format] = :form
|
22
22
|
params[:method] = :post
|
23
23
|
params[:auth] = nil
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'yt/collections/base'
|
2
|
+
|
3
|
+
module Yt
|
4
|
+
module Collections
|
5
|
+
# Provides methods to interact with a collection of video captions.
|
6
|
+
class Captions < Resources
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def attributes_for_new_item(data)
|
11
|
+
{id: data['id'], snippet: data['snippet'], auth: @auth}
|
12
|
+
end
|
13
|
+
|
14
|
+
def list_params
|
15
|
+
super.tap do |params|
|
16
|
+
params[:path] = "/youtube/v3/captions"
|
17
|
+
params[:params] = captions_params
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def captions_params
|
22
|
+
{}.tap do |params|
|
23
|
+
params[:part] = 'snippet'
|
24
|
+
params[:video_id] = @parent.id if @parent
|
25
|
+
apply_where_params! params
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -15,10 +15,10 @@ module Yt
|
|
15
15
|
|
16
16
|
def list_params
|
17
17
|
super.tap do |params|
|
18
|
-
params[:host] = '
|
19
|
-
params[:path] = '/
|
20
|
-
params[:request_format] =
|
21
|
-
params[:method] = :
|
18
|
+
params[:host] = 'oauth2.googleapis.com'
|
19
|
+
params[:path] = '/revoke'
|
20
|
+
params[:request_format] = :form
|
21
|
+
params[:method] = :post
|
22
22
|
params[:auth] = nil
|
23
23
|
params[:body] = nil
|
24
24
|
params[:camelize_body] = false
|
@@ -13,7 +13,7 @@ module Yt
|
|
13
13
|
# @see https://developers.google.com/+/api/latest/people/getOpenIdConnect
|
14
14
|
def list_params
|
15
15
|
super.tap do |params|
|
16
|
-
params[:path] = '/oauth2/
|
16
|
+
params[:path] = '/oauth2/v3/userinfo'
|
17
17
|
params[:expected_response] = Net::HTTPOK
|
18
18
|
end
|
19
19
|
end
|
@@ -33,4 +33,4 @@ module Yt
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
36
|
-
end
|
36
|
+
end
|
data/lib/yt/models/account.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'open-uri'
|
2
1
|
require 'yt/models/base'
|
3
2
|
|
4
3
|
module Yt
|
@@ -67,13 +66,19 @@ module Yt
|
|
67
66
|
# @option params [String] :description The video’s description.
|
68
67
|
# @option params [Array<String>] :tags The video’s tags.
|
69
68
|
# @option params [String] :privacy_status The video’s privacy status.
|
69
|
+
# @option params [Boolean] :self_declared_made_for_kids The video’s made for kids self-declaration.
|
70
70
|
# @return [Yt::Models::Video] the newly uploaded video.
|
71
71
|
def upload_video(path_or_url, params = {})
|
72
|
-
file = open
|
72
|
+
file = URI.open(path_or_url)
|
73
73
|
session = resumable_sessions.insert file.size, upload_body(params)
|
74
74
|
|
75
75
|
session.update(body: file) do |data|
|
76
|
-
Yt::Video.new
|
76
|
+
Yt::Video.new(
|
77
|
+
id: data['id'],
|
78
|
+
snippet: data['snippet'],
|
79
|
+
status: data['status'],
|
80
|
+
auth: self
|
81
|
+
)
|
77
82
|
end
|
78
83
|
end
|
79
84
|
|
@@ -217,8 +222,12 @@ module Yt
|
|
217
222
|
snippet[:categoryId] = snippet.delete(:category_id) if snippet[:category_id]
|
218
223
|
body[:snippet] = snippet if snippet.any?
|
219
224
|
|
220
|
-
|
221
|
-
|
225
|
+
privacy_status = params[:privacy_status]
|
226
|
+
self_declared_made_for_kids = params[:self_declared_made_for_kids]
|
227
|
+
|
228
|
+
body[:status] = {}
|
229
|
+
body[:status][:privacyStatus] = privacy_status if privacy_status
|
230
|
+
body[:status][:selfDeclaredMadeForKids] = self_declared_made_for_kids unless self_declared_made_for_kids.nil?
|
222
231
|
end
|
223
232
|
end
|
224
233
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'yt/models/resource'
|
2
|
+
|
3
|
+
module Yt
|
4
|
+
module Models
|
5
|
+
# Provides methods to interact with YouTube video captions.
|
6
|
+
# @see https://developers.google.com/youtube/v3/docs/captions
|
7
|
+
class Caption < Resource
|
8
|
+
|
9
|
+
# @return [String] the ID used to identify the caption.
|
10
|
+
has_attribute :id
|
11
|
+
|
12
|
+
delegate :video_id, to: :snippet
|
13
|
+
delegate :last_updated, to: :snippet
|
14
|
+
delegate :language, to: :snippet
|
15
|
+
delegate :name, to: :snippet
|
16
|
+
delegate :status, to: :snippet
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/yt/models/channel.rb
CHANGED
@@ -29,6 +29,25 @@ module Yt
|
|
29
29
|
# @return [Time] the date and time that the channel was created.
|
30
30
|
delegate :published_at, to: :snippet
|
31
31
|
|
32
|
+
### STATUS ###
|
33
|
+
|
34
|
+
# @!attribute [r] made_for_kids?
|
35
|
+
# @return [Boolean, nil] This value indicates whether the channel is
|
36
|
+
# designated as child-directed, and it contains the current "made for
|
37
|
+
# kids" status of the channel.
|
38
|
+
def made_for_kids?
|
39
|
+
status.made_for_kids
|
40
|
+
end
|
41
|
+
|
42
|
+
# @!attribute [r] self_declared_made_for_kids?
|
43
|
+
# @return [Boolean, nil] In a channels.update request, this property
|
44
|
+
# allows the channel owner to designate the channel as
|
45
|
+
# child-directed. The property value is only returned if the channel
|
46
|
+
# owner authorized the API request.
|
47
|
+
def self_declared_made_for_kids?
|
48
|
+
status.self_declared_made_for_kids
|
49
|
+
end
|
50
|
+
|
32
51
|
### SUBSCRIPTION ###
|
33
52
|
|
34
53
|
has_one :subscription
|
@@ -54,7 +54,7 @@ module Yt
|
|
54
54
|
# @option params [String] :content_type The type of content being uploaded.
|
55
55
|
# @return [Yt::Models::Reference] the newly uploaded reference.
|
56
56
|
def upload_reference_file(path_or_url, params = {})
|
57
|
-
file = open
|
57
|
+
file = URI.open(path_or_url)
|
58
58
|
session = resumable_sessions.insert file.size, params
|
59
59
|
|
60
60
|
session.update(body: file) do |data|
|
data/lib/yt/models/playlist.rb
CHANGED
@@ -37,10 +37,6 @@ module Yt
|
|
37
37
|
# @return [String] the title of the channel that the playlist belongs to.
|
38
38
|
delegate :channel_title, to: :snippet
|
39
39
|
|
40
|
-
# @!attribute [r] tags
|
41
|
-
# @return [Array<String>] the list of tags attached to the playlist.
|
42
|
-
delegate :tags, to: :snippet
|
43
|
-
|
44
40
|
### STATISTICS ###
|
45
41
|
|
46
42
|
has_one :content_detail
|
data/lib/yt/models/snippet.rb
CHANGED
@@ -38,6 +38,11 @@ module Yt
|
|
38
38
|
has_attribute :like_count, type: Integer
|
39
39
|
has_attribute :updated_at, type: Time
|
40
40
|
|
41
|
+
has_attribute :last_updated, type: Time
|
42
|
+
has_attribute :language
|
43
|
+
has_attribute :name
|
44
|
+
has_attribute :status
|
45
|
+
|
41
46
|
def thumbnail_url(size = :default)
|
42
47
|
thumbnails.fetch(size.to_s, {})['url']
|
43
48
|
end
|
@@ -17,7 +17,12 @@ module Yt
|
|
17
17
|
has_attribute :view_count, type: Integer
|
18
18
|
has_attribute :comment_count, type: Integer
|
19
19
|
has_attribute :like_count, type: Integer
|
20
|
+
|
21
|
+
# statistics.dislikeCount property included in an API response
|
22
|
+
# only if the API request was authenticated by the video owner
|
23
|
+
# as of December 13, 2021
|
20
24
|
has_attribute :dislike_count, type: Integer
|
25
|
+
|
21
26
|
has_attribute :favorite_count, type: Integer
|
22
27
|
has_attribute :video_count, type: Integer
|
23
28
|
has_attribute :subscriber_count, type: Integer
|
data/lib/yt/models/status.rb
CHANGED
data/lib/yt/models/video.rb
CHANGED
@@ -223,6 +223,21 @@ module Yt
|
|
223
223
|
status.embeddable
|
224
224
|
end
|
225
225
|
|
226
|
+
# @return [Boolean, nil] This value indicates whether the video is
|
227
|
+
# designated as child-directed, and it contains the current "made for
|
228
|
+
# kids" status of the video.
|
229
|
+
def made_for_kids?
|
230
|
+
status.made_for_kids
|
231
|
+
end
|
232
|
+
|
233
|
+
# @return [Boolean, nil] In a videos.insert or videos.update request,
|
234
|
+
# this property allows the channel owner to designate the video as
|
235
|
+
# being child-directed. In a videos.list request, the property value
|
236
|
+
# is only returned if the channel owner authorized the API request.
|
237
|
+
def self_declared_made_for_kids?
|
238
|
+
status.self_declared_made_for_kids
|
239
|
+
end
|
240
|
+
|
226
241
|
### CONTENT DETAILS ###
|
227
242
|
|
228
243
|
has_one :content_detail
|
@@ -518,6 +533,10 @@ module Yt
|
|
518
533
|
# player that will play the video.
|
519
534
|
delegate :embed_html, to: :player
|
520
535
|
|
536
|
+
### CAPTION ###
|
537
|
+
|
538
|
+
has_many :captions
|
539
|
+
|
521
540
|
### ACTIONS (UPLOAD, UPDATE, DELETE) ###
|
522
541
|
|
523
542
|
# Uploads a thumbnail
|
@@ -527,7 +546,7 @@ module Yt
|
|
527
546
|
# @raise [Yt::Errors::RequestError] if path_or_url is not a valid path
|
528
547
|
# or URL.
|
529
548
|
def upload_thumbnail(path_or_url)
|
530
|
-
file = open(path_or_url
|
549
|
+
file = URI.open(path_or_url) rescue StringIO.new
|
531
550
|
session = resumable_sessions.insert file.size
|
532
551
|
|
533
552
|
session.update(body: file) do |data|
|
@@ -667,7 +686,7 @@ module Yt
|
|
667
686
|
snippet_keys = [:title, :description, :tags, :category_id]
|
668
687
|
snippet = {keys: snippet_keys, sanitize_brackets: true}
|
669
688
|
status_keys = [:privacy_status, :embeddable, :license,
|
670
|
-
:public_stats_viewable, :publish_at]
|
689
|
+
:public_stats_viewable, :publish_at, :self_declared_made_for_kids]
|
671
690
|
{snippet: snippet, status: {keys: status_keys}}
|
672
691
|
end
|
673
692
|
|
data/lib/yt/request.rb
CHANGED
@@ -197,8 +197,7 @@ module Yt
|
|
197
197
|
# for a couple of seconds might solve the connection issues.
|
198
198
|
def run_again?
|
199
199
|
refresh_token_and_retry? && sleep_and_retry?(1) ||
|
200
|
-
server_error? && sleep_and_retry?(3)
|
201
|
-
exceeded_quota? && sleep_and_retry?(3)
|
200
|
+
server_error? && sleep_and_retry?(3)
|
202
201
|
end
|
203
202
|
|
204
203
|
# Returns the list of server errors worth retrying the request once.
|
data/lib/yt/version.rb
CHANGED
data/lib/yt.rb
CHANGED
@@ -14,6 +14,7 @@ require 'yt/models/video_group'
|
|
14
14
|
require 'yt/models/comment_thread'
|
15
15
|
require 'yt/models/ownership'
|
16
16
|
require 'yt/models/advertising_options_set'
|
17
|
+
require 'yt/models/caption'
|
17
18
|
|
18
19
|
# An object-oriented Ruby client for YouTube.
|
19
20
|
# Helps creating applications that need to interact with YouTube objects.
|
data/yt.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.homepage = "http://github.com/Fullscreen/yt"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
spec.required_ruby_version = '>= 1
|
16
|
+
spec.required_ruby_version = '>= 2.1'
|
17
17
|
|
18
18
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
19
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -22,14 +22,14 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_dependency 'activesupport'
|
25
|
+
spec.add_dependency 'activesupport'
|
26
26
|
|
27
27
|
# For development / Code coverage / Documentation
|
28
|
-
spec.add_development_dependency 'bundler'
|
29
|
-
spec.add_development_dependency 'rspec'
|
30
|
-
spec.add_development_dependency 'rake'
|
31
|
-
spec.add_development_dependency 'yard'
|
32
|
-
spec.add_development_dependency 'coveralls'
|
28
|
+
spec.add_development_dependency 'bundler'
|
29
|
+
spec.add_development_dependency 'rspec'
|
30
|
+
spec.add_development_dependency 'rake'
|
31
|
+
# spec.add_development_dependency 'yard'
|
32
|
+
# spec.add_development_dependency 'coveralls'
|
33
33
|
spec.add_development_dependency 'pry'
|
34
34
|
spec.add_development_dependency 'vcr'
|
35
35
|
spec.add_development_dependency 'webmock'
|
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.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claudio Baccigalupo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -66,34 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: yard
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: coveralls
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
70
|
name: pry
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,6 +112,7 @@ description: Youtube V3 API client.
|
|
140
112
|
email:
|
141
113
|
- claudio@fullscreen.net
|
142
114
|
executables:
|
115
|
+
- console
|
143
116
|
- yt
|
144
117
|
extensions: []
|
145
118
|
extra_rdoc_files: []
|
@@ -154,6 +127,7 @@ files:
|
|
154
127
|
- README.md
|
155
128
|
- Rakefile
|
156
129
|
- YOUTUBE_IT.md
|
130
|
+
- bin/console
|
157
131
|
- bin/yt
|
158
132
|
- gemfiles/Gemfile.activesupport-3.x
|
159
133
|
- gemfiles/Gemfile.activesupport-4.x
|
@@ -179,6 +153,7 @@ files:
|
|
179
153
|
- lib/yt/collections/base.rb
|
180
154
|
- lib/yt/collections/bulk_report_jobs.rb
|
181
155
|
- lib/yt/collections/bulk_reports.rb
|
156
|
+
- lib/yt/collections/captions.rb
|
182
157
|
- lib/yt/collections/channels.rb
|
183
158
|
- lib/yt/collections/claim_histories.rb
|
184
159
|
- lib/yt/collections/claims.rb
|
@@ -232,6 +207,7 @@ files:
|
|
232
207
|
- lib/yt/models/base.rb
|
233
208
|
- lib/yt/models/bulk_report.rb
|
234
209
|
- lib/yt/models/bulk_report_job.rb
|
210
|
+
- lib/yt/models/caption.rb
|
235
211
|
- lib/yt/models/channel.rb
|
236
212
|
- lib/yt/models/claim.rb
|
237
213
|
- lib/yt/models/claim_event.rb
|
@@ -247,7 +223,6 @@ files:
|
|
247
223
|
- lib/yt/models/group_info.rb
|
248
224
|
- lib/yt/models/group_item.rb
|
249
225
|
- lib/yt/models/id.rb
|
250
|
-
- lib/yt/models/iterator.rb
|
251
226
|
- lib/yt/models/live_streaming_detail.rb
|
252
227
|
- lib/yt/models/match_policy.rb
|
253
228
|
- lib/yt/models/ownership.rb
|
@@ -287,14 +262,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
287
262
|
requirements:
|
288
263
|
- - ">="
|
289
264
|
- !ruby/object:Gem::Version
|
290
|
-
version: 1
|
265
|
+
version: '2.1'
|
291
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
292
267
|
requirements:
|
293
268
|
- - ">="
|
294
269
|
- !ruby/object:Gem::Version
|
295
270
|
version: '0'
|
296
271
|
requirements: []
|
297
|
-
rubygems_version: 3.
|
272
|
+
rubygems_version: 3.5.22
|
298
273
|
signing_key:
|
299
274
|
specification_version: 4
|
300
275
|
summary: Yt makes it easy to interact with Youtube V3 API by providing a modular,
|
data/lib/yt/models/iterator.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
module Yt
|
2
|
-
module Models
|
3
|
-
# @private
|
4
|
-
# If we dropped support for Ruby 1.9.3, then we could simply use Enumerator
|
5
|
-
# which takes a `size` parameter in Ruby >= 2.
|
6
|
-
class Iterator < Enumerator
|
7
|
-
def initialize(size=nil, &block)
|
8
|
-
RUBY_VERSION < '2' ? super(&block) : super(size, &block)
|
9
|
-
end
|
10
|
-
|
11
|
-
def size
|
12
|
-
RUBY_VERSION < '2' ? count : super
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|