yt 0.32.5 → 0.33.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -4
- data/CHANGELOG.md +40 -0
- data/README.md +22 -33
- data/YOUTUBE_IT.md +4 -4
- data/lib/yt.rb +1 -1
- data/lib/yt/actions/list.rb +1 -1
- data/lib/yt/associations/has_reports.rb +9 -14
- data/lib/yt/collections/playlist_items.rb +10 -1
- data/lib/yt/collections/reports.rb +5 -7
- data/lib/yt/models/account.rb +20 -0
- data/lib/yt/models/channel.rb +2 -5
- data/lib/yt/models/content_owner.rb +20 -0
- data/lib/yt/models/playlist.rb +12 -2
- data/lib/yt/models/playlist_item.rb +8 -1
- data/lib/yt/models/resource.rb +74 -3
- data/lib/yt/models/statistics_set.rb +2 -1
- data/lib/yt/models/url.rb +2 -60
- data/lib/yt/models/video.rb +15 -2
- data/lib/yt/request.rb +6 -2
- data/lib/yt/version.rb +1 -1
- data/yt.gemspec +5 -2
- metadata +35 -174
- data/spec/collections/claims_spec.rb +0 -62
- data/spec/collections/comment_threads_spec.rb +0 -46
- data/spec/collections/playlist_items_spec.rb +0 -44
- data/spec/collections/playlists_spec.rb +0 -27
- data/spec/collections/policies_spec.rb +0 -30
- data/spec/collections/references_spec.rb +0 -30
- data/spec/collections/reports_spec.rb +0 -30
- data/spec/collections/subscriptions_spec.rb +0 -25
- data/spec/collections/videos_spec.rb +0 -43
- data/spec/constants/geography_spec.rb +0 -16
- data/spec/errors/forbidden_spec.rb +0 -10
- data/spec/errors/missing_auth_spec.rb +0 -24
- data/spec/errors/no_items_spec.rb +0 -10
- data/spec/errors/request_error_spec.rb +0 -44
- data/spec/errors/server_error_spec.rb +0 -10
- data/spec/errors/unauthorized_spec.rb +0 -10
- data/spec/models/account_spec.rb +0 -138
- data/spec/models/annotation_spec.rb +0 -180
- data/spec/models/asset_spec.rb +0 -32
- data/spec/models/channel_spec.rb +0 -127
- data/spec/models/claim_event_spec.rb +0 -62
- data/spec/models/claim_history_spec.rb +0 -27
- data/spec/models/claim_spec.rb +0 -223
- data/spec/models/comment_spec.rb +0 -40
- data/spec/models/comment_thread_spec.rb +0 -93
- data/spec/models/configuration_spec.rb +0 -44
- data/spec/models/content_detail_spec.rb +0 -52
- data/spec/models/content_owner_detail_spec.rb +0 -6
- data/spec/models/file_detail_spec.rb +0 -13
- data/spec/models/live_streaming_detail_spec.rb +0 -6
- data/spec/models/ownership_spec.rb +0 -59
- data/spec/models/player_spec.rb +0 -13
- data/spec/models/playlist_item_spec.rb +0 -120
- data/spec/models/playlist_spec.rb +0 -138
- data/spec/models/policy_rule_spec.rb +0 -63
- data/spec/models/policy_spec.rb +0 -41
- data/spec/models/rating_spec.rb +0 -12
- data/spec/models/reference_spec.rb +0 -249
- data/spec/models/request_spec.rb +0 -204
- data/spec/models/resource_spec.rb +0 -42
- data/spec/models/right_owner_spec.rb +0 -71
- data/spec/models/snippet_spec.rb +0 -13
- data/spec/models/statistics_set_spec.rb +0 -13
- data/spec/models/status_spec.rb +0 -13
- data/spec/models/subscription_spec.rb +0 -30
- data/spec/models/url_spec.rb +0 -78
- data/spec/models/video_category_spec.rb +0 -21
- data/spec/models/video_spec.rb +0 -669
- data/spec/requests/as_account/account_spec.rb +0 -143
- data/spec/requests/as_account/authentications_spec.rb +0 -127
- data/spec/requests/as_account/channel_spec.rb +0 -246
- data/spec/requests/as_account/channels_spec.rb +0 -18
- data/spec/requests/as_account/playlist_item_spec.rb +0 -55
- data/spec/requests/as_account/playlist_spec.rb +0 -218
- data/spec/requests/as_account/thumbnail.jpg +0 -0
- data/spec/requests/as_account/video.mp4 +0 -0
- data/spec/requests/as_account/video_spec.rb +0 -408
- data/spec/requests/as_content_owner/account_spec.rb +0 -29
- data/spec/requests/as_content_owner/advertising_options_set_spec.rb +0 -15
- data/spec/requests/as_content_owner/asset_spec.rb +0 -31
- data/spec/requests/as_content_owner/bulk_report_job_spec.rb +0 -19
- data/spec/requests/as_content_owner/channel_spec.rb +0 -1836
- data/spec/requests/as_content_owner/claim_history_spec.rb +0 -20
- data/spec/requests/as_content_owner/claim_spec.rb +0 -17
- data/spec/requests/as_content_owner/content_owner_spec.rb +0 -370
- data/spec/requests/as_content_owner/match_policy_spec.rb +0 -17
- data/spec/requests/as_content_owner/ownership_spec.rb +0 -25
- data/spec/requests/as_content_owner/playlist_spec.rb +0 -767
- data/spec/requests/as_content_owner/video_group_spec.rb +0 -112
- data/spec/requests/as_content_owner/video_spec.rb +0 -1211
- data/spec/requests/as_server_app/channel_spec.rb +0 -54
- data/spec/requests/as_server_app/comment_spec.rb +0 -22
- data/spec/requests/as_server_app/comment_thread_spec.rb +0 -27
- data/spec/requests/as_server_app/comment_threads_spec.rb +0 -41
- data/spec/requests/as_server_app/playlist_item_spec.rb +0 -30
- data/spec/requests/as_server_app/playlist_spec.rb +0 -33
- data/spec/requests/as_server_app/url_spec.rb +0 -94
- data/spec/requests/as_server_app/video_spec.rb +0 -60
- data/spec/requests/as_server_app/videos_spec.rb +0 -40
- data/spec/requests/unauthenticated/video_spec.rb +0 -14
- data/spec/spec_helper.rb +0 -20
- data/spec/support/fail_matcher.rb +0 -15
- data/spec/support/global_hooks.rb +0 -48
@@ -101,6 +101,13 @@ module Yt
|
|
101
101
|
{kind: 'youtube#video', videoId: video_id}
|
102
102
|
end
|
103
103
|
|
104
|
+
def delete_params
|
105
|
+
super.tap do |params|
|
106
|
+
params[:params] ||= {}
|
107
|
+
params[:params].merge! @auth.playlist_items_params
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
104
111
|
# @see https://developers.google.com/youtube/v3/docs/playlistItems/update
|
105
112
|
def update_parts
|
106
113
|
keys = [:position, :playlist_id, :resource_id]
|
@@ -109,4 +116,4 @@ module Yt
|
|
109
116
|
end
|
110
117
|
end
|
111
118
|
end
|
112
|
-
end
|
119
|
+
end
|
data/lib/yt/models/resource.rb
CHANGED
@@ -12,7 +12,13 @@ module Yt
|
|
12
12
|
|
13
13
|
# @!attribute [r] id
|
14
14
|
# @return [String] the ID that YouTube uses to identify each resource.
|
15
|
-
|
15
|
+
def id
|
16
|
+
if @id.nil? && @match && @match[:kind] == :channel
|
17
|
+
@id ||= fetch_channel_id
|
18
|
+
else
|
19
|
+
@id
|
20
|
+
end
|
21
|
+
end
|
16
22
|
|
17
23
|
### STATUS ###
|
18
24
|
|
@@ -42,7 +48,13 @@ module Yt
|
|
42
48
|
|
43
49
|
# @private
|
44
50
|
def initialize(options = {})
|
45
|
-
|
51
|
+
if options[:url]
|
52
|
+
@url = options[:url]
|
53
|
+
@match = find_pattern_match
|
54
|
+
@id = @match['id']
|
55
|
+
else
|
56
|
+
@id = options[:id]
|
57
|
+
end
|
46
58
|
@auth = options[:auth]
|
47
59
|
@snippet = Snippet.new(data: options[:snippet]) if options[:snippet]
|
48
60
|
@status = Status.new(data: options[:status]) if options[:status]
|
@@ -50,7 +62,11 @@ module Yt
|
|
50
62
|
|
51
63
|
# @private
|
52
64
|
def kind
|
53
|
-
|
65
|
+
if @url
|
66
|
+
@match[:kind].to_s
|
67
|
+
else
|
68
|
+
self.class.to_s.demodulize.underscore
|
69
|
+
end
|
54
70
|
end
|
55
71
|
|
56
72
|
# @private
|
@@ -66,8 +82,63 @@ module Yt
|
|
66
82
|
end
|
67
83
|
end
|
68
84
|
|
85
|
+
# @return [Array<Regexp>] patterns matching URLs of YouTube playlists.
|
86
|
+
PLAYLIST_PATTERNS = [
|
87
|
+
%r{^(?:https?://)?(?:www\.)?youtube\.com/playlist/?\?list=(?<id>[a-zA-Z0-9_-]+)},
|
88
|
+
]
|
89
|
+
|
90
|
+
# @return [Array<Regexp>] patterns matching URLs of YouTube videos.
|
91
|
+
VIDEO_PATTERNS = [
|
92
|
+
%r{^(?:https?://)?(?:www\.)?youtube\.com/watch\?v=(?<id>[a-zA-Z0-9_-]{11})},
|
93
|
+
%r{^(?:https?://)?(?:www\.)?youtu\.be/(?<id>[a-zA-Z0-9_-]{11})},
|
94
|
+
%r{^(?:https?://)?(?:www\.)?youtube\.com/embed/(?<id>[a-zA-Z0-9_-]{11})},
|
95
|
+
%r{^(?:https?://)?(?:www\.)?youtube\.com/v/(?<id>[a-zA-Z0-9_-]{11})},
|
96
|
+
]
|
97
|
+
|
98
|
+
# @return [Array<Regexp>] patterns matching URLs of YouTube channels.
|
99
|
+
CHANNEL_PATTERNS = [
|
100
|
+
%r{^(?:https?://)?(?:www\.)?youtube\.com/channel/(?<id>UC[a-zA-Z0-9_-]{22})},
|
101
|
+
%r{^(?:https?://)?(?:www\.)?youtube\.com/(?<format>c/|user/)?(?<name>[a-zA-Z0-9_-]+)}
|
102
|
+
]
|
103
|
+
|
69
104
|
private
|
70
105
|
|
106
|
+
def find_pattern_match
|
107
|
+
patterns.find do |kind, regex|
|
108
|
+
if data = @url.match(regex)
|
109
|
+
# Note: With Ruby 2.4, the following is data.named_captures
|
110
|
+
break data.names.zip(data.captures).to_h.merge kind: kind
|
111
|
+
end
|
112
|
+
end || {kind: :unknown}
|
113
|
+
end
|
114
|
+
|
115
|
+
def patterns
|
116
|
+
# @note: :channel *must* be the last since one of its regex eats the
|
117
|
+
# remaining patterns. In short, don't change the following order.
|
118
|
+
Enumerator.new do |patterns|
|
119
|
+
VIDEO_PATTERNS.each {|regex| patterns << [:video, regex]}
|
120
|
+
PLAYLIST_PATTERNS.each {|regex| patterns << [:playlist, regex]}
|
121
|
+
CHANNEL_PATTERNS.each {|regex| patterns << [:channel, regex]}
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def fetch_channel_id
|
126
|
+
response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
|
127
|
+
http.request Net::HTTP::Get.new("/#{@match['format']}#{@match['name']}")
|
128
|
+
end
|
129
|
+
if response.is_a?(Net::HTTPRedirection)
|
130
|
+
response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
|
131
|
+
http.request Net::HTTP::Get.new(response['location'])
|
132
|
+
end
|
133
|
+
end
|
134
|
+
regex = %r{<meta itemprop="channelId" content="(?<id>UC[a-zA-Z0-9_-]{22})">}
|
135
|
+
if data = response.body.match(regex)
|
136
|
+
data[:id]
|
137
|
+
else
|
138
|
+
raise Yt::Errors::NoItems
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
71
142
|
# Since YouTube API only returns tags on Videos#list, the memoized
|
72
143
|
# `@snippet` is erased if the video was instantiated through Video#search
|
73
144
|
# (e.g., by calling account.videos or channel.videos), so that the full
|
@@ -6,6 +6,7 @@ module Yt
|
|
6
6
|
# Encapsulates statistics about the resource, such as the number of times
|
7
7
|
# the resource has been viewed or liked.
|
8
8
|
# @see https://developers.google.com/youtube/v3/docs/videos#resource
|
9
|
+
# @see https://developers.google.com/youtube/v3/docs/channels#resource-representation
|
9
10
|
class StatisticsSet < Base
|
10
11
|
attr_reader :data
|
11
12
|
|
@@ -23,4 +24,4 @@ module Yt
|
|
23
24
|
has_attribute :hidden_subscriber_count
|
24
25
|
end
|
25
26
|
end
|
26
|
-
end
|
27
|
+
end
|
data/lib/yt/models/url.rb
CHANGED
@@ -14,18 +14,17 @@ module Yt
|
|
14
14
|
# @param [String] text the name or URL of a YouTube resource (in any form).
|
15
15
|
def initialize(text)
|
16
16
|
@text = text.to_s.strip
|
17
|
-
@match = find_pattern_match
|
18
17
|
end
|
19
18
|
|
20
19
|
# @return [Symbol] the kind of YouTube resource matching the URL.
|
21
20
|
# Possible values are: +:playlist+, +:video+, +:channel+, and +:unknown:.
|
22
21
|
def kind
|
23
|
-
@
|
22
|
+
Resource.new(url: @text).kind.to_sym
|
24
23
|
end
|
25
24
|
|
26
25
|
# @return [<String, nil>] the ID of the YouTube resource matching the URL.
|
27
26
|
def id
|
28
|
-
@
|
27
|
+
Resource.new(url: @text).id
|
29
28
|
end
|
30
29
|
|
31
30
|
# @return [<Yt::Channel>] the resource associated with the URL
|
@@ -37,63 +36,6 @@ module Yt
|
|
37
36
|
else raise Yt::Errors::NoItems
|
38
37
|
end.new options.merge(id: id)
|
39
38
|
end
|
40
|
-
|
41
|
-
# @return [Array<Regexp>] patterns matching URLs of YouTube playlists.
|
42
|
-
PLAYLIST_PATTERNS = [
|
43
|
-
%r{^(?:https?://)?(?:www\.)?youtube\.com/playlist/?\?list=(?<id>[a-zA-Z0-9_-]+)},
|
44
|
-
]
|
45
|
-
|
46
|
-
# @return [Array<Regexp>] patterns matching URLs of YouTube videos.
|
47
|
-
VIDEO_PATTERNS = [
|
48
|
-
%r{^(?:https?://)?(?:www\.)?youtube\.com/watch\?v=(?<id>[a-zA-Z0-9_-]{11})},
|
49
|
-
%r{^(?:https?://)?(?:www\.)?youtu\.be/(?<id>[a-zA-Z0-9_-]{11})},
|
50
|
-
%r{^(?:https?://)?(?:www\.)?youtube\.com/embed/(?<id>[a-zA-Z0-9_-]{11})},
|
51
|
-
%r{^(?:https?://)?(?:www\.)?youtube\.com/v/(?<id>[a-zA-Z0-9_-]{11})},
|
52
|
-
]
|
53
|
-
|
54
|
-
# @return [Array<Regexp>] patterns matching URLs of YouTube channels.
|
55
|
-
CHANNEL_PATTERNS = [
|
56
|
-
%r{^(?:https?://)?(?:www\.)?youtube\.com/channel/(?<id>UC[a-zA-Z0-9_-]{22})},
|
57
|
-
%r{^(?:https?://)?(?:www\.)?youtube\.com/(?<format>c/|user/)?(?<name>[a-zA-Z0-9_-]+)}
|
58
|
-
]
|
59
|
-
|
60
|
-
private
|
61
|
-
|
62
|
-
def find_pattern_match
|
63
|
-
patterns.find(-> {{kind: :unknown}}) do |kind, regex|
|
64
|
-
if data = @text.match(regex)
|
65
|
-
# Note: With Ruby 2.4, the following is data.named_captures
|
66
|
-
break data.names.zip(data.captures).to_h.merge kind: kind
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
def patterns
|
72
|
-
# @note: :channel *must* be the last since one of its regex eats the
|
73
|
-
# remaining patterns. In short, don't change the following order.
|
74
|
-
Enumerator.new do |patterns|
|
75
|
-
VIDEO_PATTERNS.each {|regex| patterns << [:video, regex]}
|
76
|
-
PLAYLIST_PATTERNS.each {|regex| patterns << [:playlist, regex]}
|
77
|
-
CHANNEL_PATTERNS.each {|regex| patterns << [:channel, regex]}
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def fetch_id
|
82
|
-
response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
|
83
|
-
http.request Net::HTTP::Get.new("/#{@match['format']}#{@match['name']}")
|
84
|
-
end
|
85
|
-
if response.is_a?(Net::HTTPRedirection)
|
86
|
-
response = Net::HTTP.start 'www.youtube.com', 443, use_ssl: true do |http|
|
87
|
-
http.request Net::HTTP::Get.new(response['location'])
|
88
|
-
end
|
89
|
-
end
|
90
|
-
regex = %r{<meta itemprop="channelId" content="(?<id>UC[a-zA-Z0-9_-]{22})">}
|
91
|
-
if data = response.body.match(regex)
|
92
|
-
data[:id]
|
93
|
-
else
|
94
|
-
raise Yt::Errors::NoItems
|
95
|
-
end
|
96
|
-
end
|
97
39
|
end
|
98
40
|
end
|
99
41
|
end
|
data/lib/yt/models/video.rb
CHANGED
@@ -621,7 +621,8 @@ module Yt
|
|
621
621
|
# @private
|
622
622
|
# Tells `has_reports` to retrieve the reports from YouTube Analytics API
|
623
623
|
# either as a Channel or as a Content Owner.
|
624
|
-
# @see https://developers.google.com/youtube/analytics/
|
624
|
+
# @see https://developers.google.com/youtube/analytics/channel_reports
|
625
|
+
# @see https://developers.google.com/youtube/analytics/content_owner_reports
|
625
626
|
def reports_params
|
626
627
|
{}.tap do |params|
|
627
628
|
if auth.owner_name
|
@@ -642,8 +643,11 @@ module Yt
|
|
642
643
|
# @private
|
643
644
|
# Tells `has_many :resumable_sessions` what params are set for the object
|
644
645
|
# associated to the uploaded file.
|
646
|
+
# https://developers.google.com/youtube/v3/docs/thumbnails/set
|
645
647
|
def upload_params
|
646
|
-
{video_id: id}
|
648
|
+
params = {video_id: id}
|
649
|
+
params.merge! auth.upload_thumbnail_params
|
650
|
+
params
|
647
651
|
end
|
648
652
|
|
649
653
|
# @private
|
@@ -667,6 +671,15 @@ module Yt
|
|
667
671
|
{snippet: snippet, status: {keys: status_keys}}
|
668
672
|
end
|
669
673
|
|
674
|
+
# For updating video with content owner auth.
|
675
|
+
# @see https://developers.google.com/youtube/v3/docs/videos/update
|
676
|
+
def update_params
|
677
|
+
params = super
|
678
|
+
params[:params] ||= {}
|
679
|
+
params[:params].merge! auth.update_video_params
|
680
|
+
params
|
681
|
+
end
|
682
|
+
|
670
683
|
# NOTE: Another irrational behavior of YouTube API. If you are setting a
|
671
684
|
# video to public/unlisted then you should *not* pass publishAt at any
|
672
685
|
# cost, otherwise the API will fail (since setting publishAt means you
|
data/lib/yt/request.rb
CHANGED
@@ -196,7 +196,7 @@ module Yt
|
|
196
196
|
# - when the user has reached the quota for requests/second, and waiting
|
197
197
|
# for a couple of seconds might solve the connection issues.
|
198
198
|
def run_again?
|
199
|
-
refresh_token_and_retry? ||
|
199
|
+
refresh_token_and_retry? && sleep_and_retry?(1) ||
|
200
200
|
server_error? && sleep_and_retry?(3) ||
|
201
201
|
exceeded_quota? && sleep_and_retry?(3)
|
202
202
|
end
|
@@ -234,10 +234,14 @@ module Yt
|
|
234
234
|
@retries_so_far += 1
|
235
235
|
if (@retries_so_far < max_retries)
|
236
236
|
@response = @http_request = @uri = nil
|
237
|
-
sleep
|
237
|
+
sleep retry_time
|
238
238
|
end
|
239
239
|
end
|
240
240
|
|
241
|
+
def retry_time
|
242
|
+
3 + (10 * @retries_so_far)
|
243
|
+
end
|
244
|
+
|
241
245
|
# In case an authorized request responds with "Unauthorized", checks
|
242
246
|
# if the original access token can be refreshed. If that's the case,
|
243
247
|
# clears the memoized variables and returns true, so the request can
|
data/lib/yt/version.rb
CHANGED
data/yt.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
1
|
lib = File.expand_path('../lib', __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'yt/version'
|
@@ -16,7 +15,9 @@ Gem::Specification.new do |spec|
|
|
16
15
|
|
17
16
|
spec.required_ruby_version = '>= 1.9.3'
|
18
17
|
|
19
|
-
spec.files =
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
20
21
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
23
|
spec.require_paths = ["lib"]
|
@@ -30,4 +31,6 @@ Gem::Specification.new do |spec|
|
|
30
31
|
spec.add_development_dependency 'yard' #, '~> 0.8.0'
|
31
32
|
spec.add_development_dependency 'coveralls' #, '~> 0.7.0'
|
32
33
|
spec.add_development_dependency 'pry'
|
34
|
+
spec.add_development_dependency 'vcr'
|
35
|
+
spec.add_development_dependency 'webmock'
|
33
36
|
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.
|
4
|
+
version: 0.33.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claudio Baccigalupo
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -108,6 +108,34 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: vcr
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
111
139
|
description: Youtube V3 API client.
|
112
140
|
email:
|
113
141
|
- claudio@fullscreen.net
|
@@ -246,95 +274,12 @@ files:
|
|
246
274
|
- lib/yt/models/video_group.rb
|
247
275
|
- lib/yt/request.rb
|
248
276
|
- lib/yt/version.rb
|
249
|
-
- spec/collections/claims_spec.rb
|
250
|
-
- spec/collections/comment_threads_spec.rb
|
251
|
-
- spec/collections/playlist_items_spec.rb
|
252
|
-
- spec/collections/playlists_spec.rb
|
253
|
-
- spec/collections/policies_spec.rb
|
254
|
-
- spec/collections/references_spec.rb
|
255
|
-
- spec/collections/reports_spec.rb
|
256
|
-
- spec/collections/subscriptions_spec.rb
|
257
|
-
- spec/collections/videos_spec.rb
|
258
|
-
- spec/constants/geography_spec.rb
|
259
|
-
- spec/errors/forbidden_spec.rb
|
260
|
-
- spec/errors/missing_auth_spec.rb
|
261
|
-
- spec/errors/no_items_spec.rb
|
262
|
-
- spec/errors/request_error_spec.rb
|
263
|
-
- spec/errors/server_error_spec.rb
|
264
|
-
- spec/errors/unauthorized_spec.rb
|
265
|
-
- spec/models/account_spec.rb
|
266
|
-
- spec/models/annotation_spec.rb
|
267
|
-
- spec/models/asset_spec.rb
|
268
|
-
- spec/models/channel_spec.rb
|
269
|
-
- spec/models/claim_event_spec.rb
|
270
|
-
- spec/models/claim_history_spec.rb
|
271
|
-
- spec/models/claim_spec.rb
|
272
|
-
- spec/models/comment_spec.rb
|
273
|
-
- spec/models/comment_thread_spec.rb
|
274
|
-
- spec/models/configuration_spec.rb
|
275
|
-
- spec/models/content_detail_spec.rb
|
276
|
-
- spec/models/content_owner_detail_spec.rb
|
277
|
-
- spec/models/file_detail_spec.rb
|
278
|
-
- spec/models/live_streaming_detail_spec.rb
|
279
|
-
- spec/models/ownership_spec.rb
|
280
|
-
- spec/models/player_spec.rb
|
281
|
-
- spec/models/playlist_item_spec.rb
|
282
|
-
- spec/models/playlist_spec.rb
|
283
|
-
- spec/models/policy_rule_spec.rb
|
284
|
-
- spec/models/policy_spec.rb
|
285
|
-
- spec/models/rating_spec.rb
|
286
|
-
- spec/models/reference_spec.rb
|
287
|
-
- spec/models/request_spec.rb
|
288
|
-
- spec/models/resource_spec.rb
|
289
|
-
- spec/models/right_owner_spec.rb
|
290
|
-
- spec/models/snippet_spec.rb
|
291
|
-
- spec/models/statistics_set_spec.rb
|
292
|
-
- spec/models/status_spec.rb
|
293
|
-
- spec/models/subscription_spec.rb
|
294
|
-
- spec/models/url_spec.rb
|
295
|
-
- spec/models/video_category_spec.rb
|
296
|
-
- spec/models/video_spec.rb
|
297
|
-
- spec/requests/as_account/account_spec.rb
|
298
|
-
- spec/requests/as_account/authentications_spec.rb
|
299
|
-
- spec/requests/as_account/channel_spec.rb
|
300
|
-
- spec/requests/as_account/channels_spec.rb
|
301
|
-
- spec/requests/as_account/playlist_item_spec.rb
|
302
|
-
- spec/requests/as_account/playlist_spec.rb
|
303
|
-
- spec/requests/as_account/thumbnail.jpg
|
304
|
-
- spec/requests/as_account/video.mp4
|
305
|
-
- spec/requests/as_account/video_spec.rb
|
306
|
-
- spec/requests/as_content_owner/account_spec.rb
|
307
|
-
- spec/requests/as_content_owner/advertising_options_set_spec.rb
|
308
|
-
- spec/requests/as_content_owner/asset_spec.rb
|
309
|
-
- spec/requests/as_content_owner/bulk_report_job_spec.rb
|
310
|
-
- spec/requests/as_content_owner/channel_spec.rb
|
311
|
-
- spec/requests/as_content_owner/claim_history_spec.rb
|
312
|
-
- spec/requests/as_content_owner/claim_spec.rb
|
313
|
-
- spec/requests/as_content_owner/content_owner_spec.rb
|
314
|
-
- spec/requests/as_content_owner/match_policy_spec.rb
|
315
|
-
- spec/requests/as_content_owner/ownership_spec.rb
|
316
|
-
- spec/requests/as_content_owner/playlist_spec.rb
|
317
|
-
- spec/requests/as_content_owner/video_group_spec.rb
|
318
|
-
- spec/requests/as_content_owner/video_spec.rb
|
319
|
-
- spec/requests/as_server_app/channel_spec.rb
|
320
|
-
- spec/requests/as_server_app/comment_spec.rb
|
321
|
-
- spec/requests/as_server_app/comment_thread_spec.rb
|
322
|
-
- spec/requests/as_server_app/comment_threads_spec.rb
|
323
|
-
- spec/requests/as_server_app/playlist_item_spec.rb
|
324
|
-
- spec/requests/as_server_app/playlist_spec.rb
|
325
|
-
- spec/requests/as_server_app/url_spec.rb
|
326
|
-
- spec/requests/as_server_app/video_spec.rb
|
327
|
-
- spec/requests/as_server_app/videos_spec.rb
|
328
|
-
- spec/requests/unauthenticated/video_spec.rb
|
329
|
-
- spec/spec_helper.rb
|
330
|
-
- spec/support/fail_matcher.rb
|
331
|
-
- spec/support/global_hooks.rb
|
332
277
|
- yt.gemspec
|
333
278
|
homepage: http://github.com/Fullscreen/yt
|
334
279
|
licenses:
|
335
280
|
- MIT
|
336
281
|
metadata: {}
|
337
|
-
post_install_message:
|
282
|
+
post_install_message:
|
338
283
|
rdoc_options: []
|
339
284
|
require_paths:
|
340
285
|
- lib
|
@@ -349,93 +294,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
294
|
- !ruby/object:Gem::Version
|
350
295
|
version: '0'
|
351
296
|
requirements: []
|
352
|
-
|
353
|
-
|
354
|
-
signing_key:
|
297
|
+
rubygems_version: 3.1.4
|
298
|
+
signing_key:
|
355
299
|
specification_version: 4
|
356
300
|
summary: Yt makes it easy to interact with Youtube V3 API by providing a modular,
|
357
301
|
intuitive and tested Ruby-style API.
|
358
|
-
test_files:
|
359
|
-
- spec/collections/claims_spec.rb
|
360
|
-
- spec/collections/comment_threads_spec.rb
|
361
|
-
- spec/collections/playlist_items_spec.rb
|
362
|
-
- spec/collections/playlists_spec.rb
|
363
|
-
- spec/collections/policies_spec.rb
|
364
|
-
- spec/collections/references_spec.rb
|
365
|
-
- spec/collections/reports_spec.rb
|
366
|
-
- spec/collections/subscriptions_spec.rb
|
367
|
-
- spec/collections/videos_spec.rb
|
368
|
-
- spec/constants/geography_spec.rb
|
369
|
-
- spec/errors/forbidden_spec.rb
|
370
|
-
- spec/errors/missing_auth_spec.rb
|
371
|
-
- spec/errors/no_items_spec.rb
|
372
|
-
- spec/errors/request_error_spec.rb
|
373
|
-
- spec/errors/server_error_spec.rb
|
374
|
-
- spec/errors/unauthorized_spec.rb
|
375
|
-
- spec/models/account_spec.rb
|
376
|
-
- spec/models/annotation_spec.rb
|
377
|
-
- spec/models/asset_spec.rb
|
378
|
-
- spec/models/channel_spec.rb
|
379
|
-
- spec/models/claim_event_spec.rb
|
380
|
-
- spec/models/claim_history_spec.rb
|
381
|
-
- spec/models/claim_spec.rb
|
382
|
-
- spec/models/comment_spec.rb
|
383
|
-
- spec/models/comment_thread_spec.rb
|
384
|
-
- spec/models/configuration_spec.rb
|
385
|
-
- spec/models/content_detail_spec.rb
|
386
|
-
- spec/models/content_owner_detail_spec.rb
|
387
|
-
- spec/models/file_detail_spec.rb
|
388
|
-
- spec/models/live_streaming_detail_spec.rb
|
389
|
-
- spec/models/ownership_spec.rb
|
390
|
-
- spec/models/player_spec.rb
|
391
|
-
- spec/models/playlist_item_spec.rb
|
392
|
-
- spec/models/playlist_spec.rb
|
393
|
-
- spec/models/policy_rule_spec.rb
|
394
|
-
- spec/models/policy_spec.rb
|
395
|
-
- spec/models/rating_spec.rb
|
396
|
-
- spec/models/reference_spec.rb
|
397
|
-
- spec/models/request_spec.rb
|
398
|
-
- spec/models/resource_spec.rb
|
399
|
-
- spec/models/right_owner_spec.rb
|
400
|
-
- spec/models/snippet_spec.rb
|
401
|
-
- spec/models/statistics_set_spec.rb
|
402
|
-
- spec/models/status_spec.rb
|
403
|
-
- spec/models/subscription_spec.rb
|
404
|
-
- spec/models/url_spec.rb
|
405
|
-
- spec/models/video_category_spec.rb
|
406
|
-
- spec/models/video_spec.rb
|
407
|
-
- spec/requests/as_account/account_spec.rb
|
408
|
-
- spec/requests/as_account/authentications_spec.rb
|
409
|
-
- spec/requests/as_account/channel_spec.rb
|
410
|
-
- spec/requests/as_account/channels_spec.rb
|
411
|
-
- spec/requests/as_account/playlist_item_spec.rb
|
412
|
-
- spec/requests/as_account/playlist_spec.rb
|
413
|
-
- spec/requests/as_account/thumbnail.jpg
|
414
|
-
- spec/requests/as_account/video.mp4
|
415
|
-
- spec/requests/as_account/video_spec.rb
|
416
|
-
- spec/requests/as_content_owner/account_spec.rb
|
417
|
-
- spec/requests/as_content_owner/advertising_options_set_spec.rb
|
418
|
-
- spec/requests/as_content_owner/asset_spec.rb
|
419
|
-
- spec/requests/as_content_owner/bulk_report_job_spec.rb
|
420
|
-
- spec/requests/as_content_owner/channel_spec.rb
|
421
|
-
- spec/requests/as_content_owner/claim_history_spec.rb
|
422
|
-
- spec/requests/as_content_owner/claim_spec.rb
|
423
|
-
- spec/requests/as_content_owner/content_owner_spec.rb
|
424
|
-
- spec/requests/as_content_owner/match_policy_spec.rb
|
425
|
-
- spec/requests/as_content_owner/ownership_spec.rb
|
426
|
-
- spec/requests/as_content_owner/playlist_spec.rb
|
427
|
-
- spec/requests/as_content_owner/video_group_spec.rb
|
428
|
-
- spec/requests/as_content_owner/video_spec.rb
|
429
|
-
- spec/requests/as_server_app/channel_spec.rb
|
430
|
-
- spec/requests/as_server_app/comment_spec.rb
|
431
|
-
- spec/requests/as_server_app/comment_thread_spec.rb
|
432
|
-
- spec/requests/as_server_app/comment_threads_spec.rb
|
433
|
-
- spec/requests/as_server_app/playlist_item_spec.rb
|
434
|
-
- spec/requests/as_server_app/playlist_spec.rb
|
435
|
-
- spec/requests/as_server_app/url_spec.rb
|
436
|
-
- spec/requests/as_server_app/video_spec.rb
|
437
|
-
- spec/requests/as_server_app/videos_spec.rb
|
438
|
-
- spec/requests/unauthenticated/video_spec.rb
|
439
|
-
- spec/spec_helper.rb
|
440
|
-
- spec/support/fail_matcher.rb
|
441
|
-
- spec/support/global_hooks.rb
|
302
|
+
test_files: []
|