msp-youtube-g 0.4.7 → 0.4.8.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.
- data/History.txt +10 -0
- data/Manifest.txt +3 -0
- data/README.txt +2 -0
- data/Rakefile +5 -0
- data/TODO.txt +0 -2
- data/integration-test/test_client.rb +256 -0
- data/integration-test/test_video.rb +42 -0
- data/integration-test/test_video_search.rb +128 -0
- data/lib/youtube_g.rb +13 -3
- data/lib/youtube_g/client.rb +58 -13
- data/lib/youtube_g/logger.rb +0 -2
- data/lib/youtube_g/model/author.rb +3 -0
- data/lib/youtube_g/model/category.rb +4 -1
- data/lib/youtube_g/model/contact.rb +8 -0
- data/lib/youtube_g/model/content.rb +5 -0
- data/lib/youtube_g/model/playlist.rb +1 -0
- data/lib/youtube_g/model/rating.rb +7 -0
- data/lib/youtube_g/model/thumbnail.rb +7 -0
- data/lib/youtube_g/model/upload_error.rb +13 -0
- data/lib/youtube_g/model/video.rb +106 -27
- data/lib/youtube_g/parser.rb +15 -19
- data/lib/youtube_g/record.rb +1 -1
- data/lib/youtube_g/request/base_search.rb +43 -0
- data/lib/youtube_g/request/standard_search.rb +40 -0
- data/lib/youtube_g/request/user_search.rb +18 -0
- data/lib/youtube_g/request/video_search.rb +40 -115
- data/lib/youtube_g/request/video_upload.rb +16 -21
- data/lib/youtube_g/response/video_search.rb +7 -7
- data/test/search.xml +66 -0
- data/test/test_parser.rb +172 -0
- data/test/test_upload.rb +79 -0
- data/test/upload.xml +51 -0
- metadata +15 -8
@@ -1,22 +1,22 @@
|
|
1
1
|
class YouTubeG
|
2
2
|
module Response
|
3
3
|
class VideoSearch < YouTubeG::Record
|
4
|
-
#
|
5
|
-
attr_reader :feed_id
|
4
|
+
# *String*:: Unique feed identifying url.
|
5
|
+
attr_reader :feed_id
|
6
6
|
|
7
|
-
#
|
7
|
+
# *Fixnum*:: Number of results per page.
|
8
8
|
attr_reader :max_result_count
|
9
9
|
|
10
|
-
#
|
10
|
+
# *Fixnum*:: 1-based offset index into the full result set.
|
11
11
|
attr_reader :offset
|
12
12
|
|
13
|
-
#
|
13
|
+
# *Fixnum*:: Total number of results available for the original request.
|
14
14
|
attr_reader :total_result_count
|
15
15
|
|
16
|
-
#
|
16
|
+
# *Time*:: Date and time at which the feed was last updated
|
17
17
|
attr_reader :updated_at
|
18
18
|
|
19
|
-
#
|
19
|
+
# *Array*:: Array of YouTubeG::Model::Video records
|
20
20
|
attr_reader :videos
|
21
21
|
end
|
22
22
|
end
|
data/test/search.xml
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
|
3
|
+
xmlns:gml='http://www.opengis.net/gml' xmlns:georss='http://www.georss.org/georss'
|
4
|
+
xmlns:media='http://search.yahoo.com/mrss/' xmlns:yt='http://gdata.youtube.com/schemas/2007'
|
5
|
+
xmlns:gd='http://schemas.google.com/g/2005'>
|
6
|
+
<id>http://gdata.youtube.com/feeds/api/users/speechboxmatt/uploads</id>
|
7
|
+
<updated>2008-06-28T16:34:33.062Z</updated>
|
8
|
+
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
|
9
|
+
<title type='text'>Videos of speechboxmatt</title>
|
10
|
+
<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
|
11
|
+
<link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/users/speechboxmatt'/>
|
12
|
+
<link rel='alternate' type='text/html' href='http://www.youtube.com/profile_videos?user=speechboxmatt'/>
|
13
|
+
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml'
|
14
|
+
href='http://gdata.youtube.com/feeds/api/users/speechboxmatt/uploads'/>
|
15
|
+
<link rel='self' type='application/atom+xml'
|
16
|
+
href='http://gdata.youtube.com/feeds/api/users/speechboxmatt/uploads?start-index=1&max-results=25'/>
|
17
|
+
<author>
|
18
|
+
<name>speechboxmatt</name>
|
19
|
+
<uri>http://gdata.youtube.com/feeds/api/users/speechboxmatt</uri>
|
20
|
+
</author>
|
21
|
+
<generator version='beta' uri='http://gdata.youtube.com/'>YouTube data API</generator>
|
22
|
+
<openSearch:totalResults>1</openSearch:totalResults>
|
23
|
+
<openSearch:startIndex>1</openSearch:startIndex>
|
24
|
+
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
|
25
|
+
<entry>
|
26
|
+
<id>http://gdata.youtube.com/feeds/api/videos/32_mQ0PRT9I</id>
|
27
|
+
<published>2008-06-28T09:01:58.000-07:00</published>
|
28
|
+
<updated>2008-06-28T09:03:18.000-07:00</updated>
|
29
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/>
|
30
|
+
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
|
31
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='test'/>
|
32
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='blah'/>
|
33
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='cool'/>
|
34
|
+
<title type='text'>Speechbox Test</title>
|
35
|
+
<content type='text'>Speechbox test Uploaded on 06/28/2008 at 05:01PM</content>
|
36
|
+
<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=32_mQ0PRT9I'/>
|
37
|
+
<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml'
|
38
|
+
href='http://gdata.youtube.com/feeds/api/videos/32_mQ0PRT9I/responses'/>
|
39
|
+
<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml'
|
40
|
+
href='http://gdata.youtube.com/feeds/api/videos/32_mQ0PRT9I/related'/>
|
41
|
+
<link rel='self' type='application/atom+xml'
|
42
|
+
href='http://gdata.youtube.com/feeds/api/users/speechboxmatt/uploads/32_mQ0PRT9I'/>
|
43
|
+
<author>
|
44
|
+
<name>speechboxmatt</name>
|
45
|
+
<uri>http://gdata.youtube.com/feeds/api/users/speechboxmatt</uri>
|
46
|
+
</author>
|
47
|
+
<media:group>
|
48
|
+
<media:title type='plain'>Speechbox Test</media:title>
|
49
|
+
<media:description type='plain'>Speechbox test Uploaded on 06/28/2008 at 05:01PM</media:description>
|
50
|
+
<media:keywords>blah, cool, test</media:keywords>
|
51
|
+
<yt:duration seconds='15'/>
|
52
|
+
<media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People
|
53
|
+
</media:category>
|
54
|
+
<media:content url='http://www.youtube.com/v/32_mQ0PRT9I' type='application/x-shockwave-flash' medium='video'
|
55
|
+
isDefault='true' expression='full' duration='15' yt:format='5'/>
|
56
|
+
<media:player url='http://www.youtube.com/watch?v=32_mQ0PRT9I'/>
|
57
|
+
<media:thumbnail url='http://img.youtube.com/vi/32_mQ0PRT9I/2.jpg' height='97' width='130' time='00:00:07.500'/>
|
58
|
+
<media:thumbnail url='http://img.youtube.com/vi/32_mQ0PRT9I/1.jpg' height='97' width='130' time='00:00:03.750'/>
|
59
|
+
<media:thumbnail url='http://img.youtube.com/vi/32_mQ0PRT9I/3.jpg' height='97' width='130' time='00:00:11.250'/>
|
60
|
+
<media:thumbnail url='http://img.youtube.com/vi/32_mQ0PRT9I/0.jpg' height='240' width='320' time='00:00:07.500'/>
|
61
|
+
</media:group>
|
62
|
+
<gd:comments>
|
63
|
+
<gd:feedLink href='http://gdata.youtube.com/feeds/api/videos/32_mQ0PRT9I/comments' countHint='0'/>
|
64
|
+
</gd:comments>
|
65
|
+
</entry>
|
66
|
+
</feed>
|
data/test/test_parser.rb
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require File.dirname(__FILE__) + '/../lib/youtube_g'
|
3
|
+
|
4
|
+
class TestParser < Test::Unit::TestCase
|
5
|
+
|
6
|
+
UPLOAD_XML = File.new(File.dirname(__FILE__) +"/upload.xml")
|
7
|
+
SEARCH_XML = File.new(File.dirname(__FILE__) +"/search.xml")
|
8
|
+
|
9
|
+
YT_VALIDATION = "yt:validation"
|
10
|
+
REQUIRED = "required"
|
11
|
+
TEXT_XPATH = "media:group/media:title/text()"
|
12
|
+
DESC_XPATH = "media:group/media:description/text()"
|
13
|
+
|
14
|
+
def setup
|
15
|
+
@ue_parser = YouTubeG::Parser::UploadErrorParser.new(well_formed_errors_xml)
|
16
|
+
@ue_parser_result = @ue_parser.parse
|
17
|
+
|
18
|
+
@vf_parser = YouTubeG::Parser::VideoFeedParser.new(UPLOAD_XML.path)
|
19
|
+
@vf_parser_result = @vf_parser.parse
|
20
|
+
|
21
|
+
@vfs_parser = YouTubeG::Parser::VideosFeedParser.new(SEARCH_XML.path)
|
22
|
+
@vfs_parser_result = @vfs_parser.parse
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_feed_parser_error_for_empty_xml
|
26
|
+
assert_raise YouTubeG::Parser::FeedParserError do
|
27
|
+
parser = YouTubeG::Parser::UploadErrorParser.new("")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_upload_error_parser
|
32
|
+
assert_instance_of(Array, @ue_parser_result)
|
33
|
+
assert_equal(2,@ue_parser_result.length)
|
34
|
+
|
35
|
+
@ue_parser_result.each_with_index do |error, i|
|
36
|
+
assert_instance_of(YouTubeG::Model::UploadError, error)
|
37
|
+
assert_equal(YT_VALIDATION,error.domain)
|
38
|
+
assert_equal(REQUIRED,error.code)
|
39
|
+
assert_equal(i == 0 ? TEXT_XPATH : DESC_XPATH,error.location)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_videos_feed_parser
|
44
|
+
assert_instance_of(YouTubeG::Response::VideoSearch, @vfs_parser_result)
|
45
|
+
assert_equal("http://gdata.youtube.com/feeds/api/users/speechboxmatt/uploads",@vfs_parser_result.feed_id)
|
46
|
+
assert_equal(25,@vfs_parser_result.max_result_count)
|
47
|
+
assert_equal(1,@vfs_parser_result.offset)
|
48
|
+
assert_equal(1,@vfs_parser_result.total_result_count)
|
49
|
+
assert_equal(Time.parse("2008-06-28T16:34:33.062Z"),@vfs_parser_result.updated_at)
|
50
|
+
assert_equal(1,@vfs_parser_result.videos.length)
|
51
|
+
|
52
|
+
@vfs_parser_result.videos.each_with_index do |video, i|
|
53
|
+
assert_instance_of(YouTubeG::Model::Video, video)
|
54
|
+
# assert_equal(15,video.duration)
|
55
|
+
assert_equal(false,video.noembed)
|
56
|
+
assert_equal(false,video.racy)
|
57
|
+
assert_equal("http://gdata.youtube.com/feeds/api/videos/32_mQ0PRT9I",video.video_id)
|
58
|
+
assert_equal(Time.parse("2008-06-28T09:01:58.000-07:00"),video.published_at)
|
59
|
+
assert_equal(Time.parse("2008-06-28T09:03:18.000-07:00"),video.updated_at)
|
60
|
+
|
61
|
+
# Categories
|
62
|
+
assert_equal(1,video.categories.length)
|
63
|
+
assert_equal("People & Blogs",video.categories[0].label)
|
64
|
+
assert_equal("People",video.categories[0].term)
|
65
|
+
# Keywords
|
66
|
+
assert_equal(3,video.keywords.length)
|
67
|
+
assert_equal("test",video.keywords[0])
|
68
|
+
assert_equal("blah",video.keywords[1])
|
69
|
+
assert_equal("cool",video.keywords[2])
|
70
|
+
|
71
|
+
assert_equal("Speechbox test Uploaded on 06/28/2008 at 05:01PM",video.description)
|
72
|
+
assert_equal("Speechbox Test",video.title)
|
73
|
+
assert_equal("Speechbox test Uploaded on 06/28/2008 at 05:01PM",video.html_content)
|
74
|
+
assert_equal("speechboxmatt",video.author.name)
|
75
|
+
assert_equal("http://gdata.youtube.com/feeds/api/users/speechboxmatt",video.author.uri)
|
76
|
+
|
77
|
+
# Media Content
|
78
|
+
assert_equal(1,video.media_content.length)
|
79
|
+
assert_equal(true,video.media_content[0].default)
|
80
|
+
assert_equal(15,video.media_content[0].duration)
|
81
|
+
assert_equal("application/x-shockwave-flash",video.media_content[0].mime_type)
|
82
|
+
|
83
|
+
# Thumbs
|
84
|
+
assert_equal(4,video.thumbnails.length)
|
85
|
+
# first thumb
|
86
|
+
assert_equal("http://img.youtube.com/vi/32_mQ0PRT9I/2.jpg",video.thumbnails[0].url)
|
87
|
+
assert_equal(97,video.thumbnails[0].height)
|
88
|
+
assert_equal(130,video.thumbnails[0].width)
|
89
|
+
assert_equal("00:00:07.500",video.thumbnails[0].time)
|
90
|
+
# forth thumb
|
91
|
+
assert_equal("http://img.youtube.com/vi/32_mQ0PRT9I/0.jpg",video.thumbnails[3].url)
|
92
|
+
assert_equal(240,video.thumbnails[3].height)
|
93
|
+
assert_equal(320,video.thumbnails[3].width)
|
94
|
+
assert_equal("00:00:07.500",video.thumbnails[3].time)
|
95
|
+
|
96
|
+
assert_equal("http://www.youtube.com/watch?v=32_mQ0PRT9I",video.player_url)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def test_video_feed_parser_derives_content_source_as_url
|
101
|
+
vf_parser = YouTubeG::Parser::VideoFeedParser.new(UPLOAD_XML.path)
|
102
|
+
assert_equal(true,vf_parser.url_based?)
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_video_feed_parser_derives_content_source_as_string
|
106
|
+
vf_parser = YouTubeG::Parser::VideoFeedParser.new(UPLOAD_XML.read)
|
107
|
+
assert_equal(false,vf_parser.url_based?)
|
108
|
+
end
|
109
|
+
|
110
|
+
def test_video_feed_parser
|
111
|
+
video = @vf_parser_result
|
112
|
+
assert_instance_of(YouTubeG::Model::Video, video)
|
113
|
+
|
114
|
+
assert_equal(false,video.noembed)
|
115
|
+
assert_equal(false,video.racy)
|
116
|
+
assert_equal("http://gdata.youtube.com/feeds/api/videos/7ARaD731I24",video.video_id)
|
117
|
+
assert_equal(Time.parse("2008-07-11T05:02:24.501-07:00"),video.published_at)
|
118
|
+
assert_equal(Time.parse("2008-07-11T05:02:24.501-07:00"),video.updated_at)
|
119
|
+
|
120
|
+
# App control - state of the upload
|
121
|
+
assert_equal("yes", video.app_control.draft)
|
122
|
+
assert_equal("processing", video.app_control.state)
|
123
|
+
|
124
|
+
# Categories
|
125
|
+
assert_equal(1,video.categories.length)
|
126
|
+
assert_equal("People & Blogs",video.categories[0].label)
|
127
|
+
assert_equal("People",video.categories[0].term)
|
128
|
+
# Keywords
|
129
|
+
assert_equal(3,video.keywords.length)
|
130
|
+
assert_equal("test",video.keywords[0])
|
131
|
+
assert_equal("blah",video.keywords[1])
|
132
|
+
assert_equal("cool",video.keywords[2])
|
133
|
+
|
134
|
+
assert_equal("Speechbox test Uploaded on 07/11/2008 at 01:02PM",video.description)
|
135
|
+
assert_equal("Speechbox Test 07/11/2008 at 01:02PM",video.title)
|
136
|
+
assert_equal("Speechbox test Uploaded on 07/11/2008 at 01:02PM",video.html_content)
|
137
|
+
assert_equal("speechboxmatt",video.author.name)
|
138
|
+
assert_equal("http://gdata.youtube.com/feeds/api/users/speechboxmatt",video.author.uri)
|
139
|
+
|
140
|
+
# Media Content
|
141
|
+
assert_equal(1,video.media_content.length)
|
142
|
+
assert_equal(true,video.media_content[0].default)
|
143
|
+
assert_equal("application/x-shockwave-flash",video.media_content[0].mime_type)
|
144
|
+
end
|
145
|
+
|
146
|
+
def well_formed_errors_xml
|
147
|
+
errors_xml = ''
|
148
|
+
errors_xml << "<?xml version='1.0' encoding='UTF-8'?>"
|
149
|
+
errors_xml << "<errors>"
|
150
|
+
errors_xml << " <error>"
|
151
|
+
errors_xml << " <domain>#{YT_VALIDATION}</domain>"
|
152
|
+
errors_xml << " <code>#{REQUIRED}</code>"
|
153
|
+
errors_xml << " <location type='xpath'>#{TEXT_XPATH}</location>"
|
154
|
+
errors_xml << " </error>"
|
155
|
+
errors_xml << " <error>"
|
156
|
+
errors_xml << " <domain>#{YT_VALIDATION}</domain>"
|
157
|
+
errors_xml << " <code>#{REQUIRED}</code>"
|
158
|
+
errors_xml << " <location type='xpath'>#{DESC_XPATH}</location>"
|
159
|
+
errors_xml << " </error>"
|
160
|
+
errors_xml << "</errors>"
|
161
|
+
end
|
162
|
+
|
163
|
+
def malformed_errors_xml
|
164
|
+
errors_xml = ''
|
165
|
+
errors_xml << "<errors>"
|
166
|
+
errors_xml << " <error>"
|
167
|
+
errors_xml << " <domain>yt:validation</domain>"
|
168
|
+
errors_xml << " <code>required</code>"
|
169
|
+
errors_xml << " <location type='xpath'>media:group/media:title/text()</location>"
|
170
|
+
errors_xml << "</errors>"
|
171
|
+
end
|
172
|
+
end
|
data/test/test_upload.rb
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require File.dirname(__FILE__) + '/../lib/youtube_g'
|
3
|
+
|
4
|
+
class TestClient < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@uploader = YouTubeG::Upload::VideoUpload.new("user","pswd","dev_key")
|
8
|
+
@uploader.auth_token = "auth_token_for_testing"
|
9
|
+
@response = nil
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_logger_still_active_without_rails_default
|
13
|
+
if Object.const_defined?(@uploader.get_rails_default_logger_name)
|
14
|
+
assert_not_nil "Expected a #{@uploader.get_rails_default_logger_name}", @uploader.logger
|
15
|
+
else
|
16
|
+
assert_not_nil "Expected a Logger.new", @uploader.logger
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_passing_auth_token_in_constructor
|
21
|
+
upload = YouTubeG::Upload::VideoUpload.new("user","pswd","dev_key")
|
22
|
+
assert_nil upload.auth_token
|
23
|
+
|
24
|
+
upload = YouTubeG::Upload::VideoUpload.new("user","pswd","dev_key","client_id", :test_token)
|
25
|
+
assert_equal :test_token, upload.auth_token
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_authentication_error_raised_for_403
|
29
|
+
Net::HTTP.module_eval do
|
30
|
+
def post(post,data,header)
|
31
|
+
response = Net::HTTPForbidden.new("403","403","403")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
assert_raise YouTubeG::Upload::AuthenticationError do
|
36
|
+
@response = @uploader.upload("a_file")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_upload_error_raised_for_400
|
41
|
+
Net::HTTP.module_eval do
|
42
|
+
def post(post,data,header)
|
43
|
+
response = YTErrors.new("400","400","400")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_raise YouTubeG::Upload::UploadError do
|
48
|
+
response = @uploader.upload("a_file")
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# stubs
|
53
|
+
class Net::HTTPForbidden < Net::HTTPClientError # 403
|
54
|
+
def body
|
55
|
+
return "ERROR=redefined_body_for_testing_only"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
class YTErrors < Net::HTTPClientError
|
60
|
+
def body
|
61
|
+
errors_xml = ''
|
62
|
+
errors_xml << "<?xml version='1.0' encoding='UTF-8'?>"
|
63
|
+
errors_xml << "<errors>"
|
64
|
+
errors_xml << " <error>"
|
65
|
+
errors_xml << " <domain>yt:validation</domain>"
|
66
|
+
errors_xml << " <code>required</code>"
|
67
|
+
errors_xml << " <location type='xpath'>media:group/media:title/text()</location>"
|
68
|
+
errors_xml << " </error>"
|
69
|
+
errors_xml << " <error>"
|
70
|
+
errors_xml << " <domain>yt:validation</domain>"
|
71
|
+
errors_xml << " <code>required</code>"
|
72
|
+
errors_xml << " <location type='xpath'>media:group/media:description/text()</location>"
|
73
|
+
errors_xml << " </error>"
|
74
|
+
errors_xml << "</errors>"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
end
|
data/test/upload.xml
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
2
|
+
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gml='http://www.opengis.net/gml'
|
3
|
+
xmlns:georss='http://www.georss.org/georss' xmlns:media='http://search.yahoo.com/mrss/'
|
4
|
+
xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:yt='http://gdata.youtube.com/schemas/2007'
|
5
|
+
xmlns:gd='http://schemas.google.com/g/2005'>
|
6
|
+
<id>http://gdata.youtube.com/feeds/api/videos/7ARaD731I24</id>
|
7
|
+
<published>2008-07-11T05:02:24.501-07:00</published>
|
8
|
+
<updated>2008-07-11T05:02:24.501-07:00</updated>
|
9
|
+
<app:control xmlns:app='http://purl.org/atom/app#'>
|
10
|
+
<app:draft>yes</app:draft>
|
11
|
+
<yt:state name='processing'/>
|
12
|
+
</app:control>
|
13
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/categories.cat' term='People' label='People & Blogs'/>
|
14
|
+
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/>
|
15
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='test'/>
|
16
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='blah'/>
|
17
|
+
<category scheme='http://gdata.youtube.com/schemas/2007/keywords.cat' term='cool'/>
|
18
|
+
<title type='text'>Speechbox Test 07/11/2008 at 01:02PM</title>
|
19
|
+
<content type='text'>Speechbox test Uploaded on 07/11/2008 at 01:02PM</content>
|
20
|
+
<link rel='alternate' type='text/html' href='http://www.youtube.com/my_videos_edit?ns=1&video_id=7ARaD731I24'/>
|
21
|
+
<link rel='http://gdata.youtube.com/schemas/2007#video.responses' type='application/atom+xml'
|
22
|
+
href='http://gdata.youtube.com/feeds/api/videos/7ARaD731I24/responses?client=ytapi-Speechbox-SpeechboxBackend-tvjvg8lf-0'/>
|
23
|
+
<link rel='http://gdata.youtube.com/schemas/2007#video.ratings' type='application/atom+xml'
|
24
|
+
href='http://gdata.youtube.com/feeds/api/videos/7ARaD731I24/ratings?client=ytapi-Speechbox-SpeechboxBackend-tvjvg8lf-0'/>
|
25
|
+
<link rel='http://gdata.youtube.com/schemas/2007#video.complaints' type='application/atom+xml'
|
26
|
+
href='http://gdata.youtube.com/feeds/api/videos/7ARaD731I24/complaints?client=ytapi-Speechbox-SpeechboxBackend-tvjvg8lf-0'/>
|
27
|
+
<link rel='http://gdata.youtube.com/schemas/2007#video.related' type='application/atom+xml'
|
28
|
+
href='http://gdata.youtube.com/feeds/api/videos/7ARaD731I24/related?client=ytapi-Speechbox-SpeechboxBackend-tvjvg8lf-0'/>
|
29
|
+
<link rel='self' type='application/atom+xml'
|
30
|
+
href='http://gdata.youtube.com/feeds/api/users/speechboxmatt/uploads/7ARaD731I24?client=ytapi-Speechbox-SpeechboxBackend-tvjvg8lf-0'/>
|
31
|
+
<link rel='edit' type='application/atom+xml'
|
32
|
+
href='http://gdata.youtube.com/feeds/api/users/speechboxmatt/uploads/7ARaD731I24?client=ytapi-Speechbox-SpeechboxBackend-tvjvg8lf-0'/>
|
33
|
+
<author>
|
34
|
+
<name>speechboxmatt</name>
|
35
|
+
<uri>http://gdata.youtube.com/feeds/api/users/speechboxmatt</uri>
|
36
|
+
</author>
|
37
|
+
<media:group>
|
38
|
+
<media:title type='plain'>Speechbox Test 07/11/2008 at 01:02PM</media:title>
|
39
|
+
<media:description type='plain'>Speechbox test Uploaded on 07/11/2008 at 01:02PM</media:description>
|
40
|
+
<media:keywords>blah, cool, test</media:keywords>
|
41
|
+
<media:category label='People & Blogs' scheme='http://gdata.youtube.com/schemas/2007/categories.cat'>People
|
42
|
+
</media:category>
|
43
|
+
<media:content url='http://www.youtube.com/v/7ARaD731I24' type='application/x-shockwave-flash' medium='video'
|
44
|
+
isDefault='true' expression='full' yt:format='5'/>
|
45
|
+
</media:group>
|
46
|
+
<gd:comments>
|
47
|
+
<gd:feedLink
|
48
|
+
href='http://gdata.youtube.com/feeds/api/videos/7ARaD731I24/comments?client=ytapi-Speechbox-SpeechboxBackend-tvjvg8lf-0'
|
49
|
+
countHint='0'/>
|
50
|
+
</gd:comments>
|
51
|
+
</entry>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: msp-youtube-g
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Vitarana
|
@@ -13,7 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2008-
|
16
|
+
date: 2008-07-25 00:00:00 -07:00
|
17
17
|
default_executable:
|
18
18
|
dependencies: []
|
19
19
|
|
@@ -45,14 +45,22 @@ files:
|
|
45
45
|
- lib/youtube_g/model/thumbnail.rb
|
46
46
|
- lib/youtube_g/model/user.rb
|
47
47
|
- lib/youtube_g/model/video.rb
|
48
|
+
- lib/youtube_g/model/upload_error.rb
|
48
49
|
- lib/youtube_g/parser.rb
|
49
50
|
- lib/youtube_g/record.rb
|
51
|
+
- lib/youtube_g/request/base_search.rb
|
52
|
+
- lib/youtube_g/request/standard_search.rb
|
53
|
+
- lib/youtube_g/request/user_search.rb
|
50
54
|
- lib/youtube_g/request/video_search.rb
|
51
55
|
- lib/youtube_g/request/video_upload.rb
|
52
56
|
- lib/youtube_g/response/video_search.rb
|
53
|
-
- test/test_client.rb
|
54
|
-
- test/test_video.rb
|
55
|
-
- test/test_video_search.rb
|
57
|
+
- integration-test/test_client.rb
|
58
|
+
- integration-test/test_video.rb
|
59
|
+
- integration-test/test_video_search.rb
|
60
|
+
- test/test_parser.rb
|
61
|
+
- test/test_upload.rb
|
62
|
+
- test/search.xml
|
63
|
+
- test/upload.xml
|
56
64
|
has_rdoc: true
|
57
65
|
homepage: http://youtube-g.rubyforge.org/
|
58
66
|
post_install_message:
|
@@ -81,6 +89,5 @@ signing_key:
|
|
81
89
|
specification_version: 2
|
82
90
|
summary: An object-oriented Ruby wrapper for the YouTube GData API
|
83
91
|
test_files:
|
84
|
-
- test/
|
85
|
-
- test/
|
86
|
-
- test/test_video_search.rb
|
92
|
+
- test/test_parser.rb
|
93
|
+
- test/test_upload.rb
|