youtube_it 1.2.5 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/youtube_it/client.rb +5 -0
- data/lib/youtube_it/request/video_upload.rb +5 -4
- data/pkg/youtube_it-1.2.5.gem +0 -0
- data/test/test_client.rb +4 -0
- data/youtube_it.gemspec +3 -2
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.6
|
data/lib/youtube_it/client.rb
CHANGED
@@ -302,6 +302,11 @@ class YouTubeIt
|
|
302
302
|
@atoken,@asecret = atoken, asecret
|
303
303
|
end
|
304
304
|
|
305
|
+
def current_user
|
306
|
+
body = access_token.get("http://gdata.youtube.com/feeds/api/users/default").body
|
307
|
+
REXML::Document.new(body).elements["entry"].elements['author'].elements['name'].text
|
308
|
+
end
|
309
|
+
|
305
310
|
private
|
306
311
|
|
307
312
|
def client
|
@@ -405,15 +405,16 @@ class YouTubeIt
|
|
405
405
|
|
406
406
|
def get_current_user
|
407
407
|
current_user_url = "/feeds/api/users/default"
|
408
|
-
|
408
|
+
response = ''
|
409
409
|
if @access_token.nil?
|
410
410
|
http_connection do |session|
|
411
|
-
|
411
|
+
response = session.get2(current_user_url, authorization_headers)
|
412
412
|
end
|
413
413
|
else
|
414
|
-
|
414
|
+
response = @access_token.get("http://gdata.youtube.com/feeds/api/users/default")
|
415
415
|
end
|
416
|
-
|
416
|
+
raise_on_faulty_response(response)
|
417
|
+
REXML::Document.new(response.body).elements["entry"].elements['author'].elements['name'].text
|
417
418
|
end
|
418
419
|
|
419
420
|
private
|
Binary file
|
data/test/test_client.rb
CHANGED
data/youtube_it.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{youtube_it}
|
8
|
-
s.version = "1.2.
|
8
|
+
s.version = "1.2.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["chebyte", "kylejginavan"]
|
12
|
-
s.date = %q{2011-01
|
12
|
+
s.date = %q{2011-02-01}
|
13
13
|
s.description = %q{Upload, delete, update, comment on youtube videos all from one gem.}
|
14
14
|
s.email = %q{kylejginavan@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
|
|
50
50
|
"pkg/youtube_it-1.2.1.gem",
|
51
51
|
"pkg/youtube_it-1.2.3.gem",
|
52
52
|
"pkg/youtube_it-1.2.4.gem",
|
53
|
+
"pkg/youtube_it-1.2.5.gem",
|
53
54
|
"test/helper.rb",
|
54
55
|
"test/test.mov",
|
55
56
|
"test/test_chain_io.rb",
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 1.2.
|
8
|
+
- 6
|
9
|
+
version: 1.2.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- chebyte
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01
|
18
|
+
date: 2011-02-01 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- pkg/youtube_it-1.2.1.gem
|
90
90
|
- pkg/youtube_it-1.2.3.gem
|
91
91
|
- pkg/youtube_it-1.2.4.gem
|
92
|
+
- pkg/youtube_it-1.2.5.gem
|
92
93
|
- test/helper.rb
|
93
94
|
- test/test.mov
|
94
95
|
- test/test_chain_io.rb
|