youtube 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/dirtywork.rb +2 -1
- metadata +1 -1
data/dirtywork.rb
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
|
24
24
|
require 'net/http'
|
25
25
|
require 'xmlsimple'
|
26
|
+
require 'uri'
|
26
27
|
|
27
28
|
HOST = 'http://youtube.com'
|
28
29
|
API = '/api2_rest'
|
@@ -52,7 +53,7 @@ module DirtyWork
|
|
52
53
|
private
|
53
54
|
def request_url(method, *params)
|
54
55
|
param_list = String.new
|
55
|
-
params[0].each_pair { |k,v| param_list << "&"+k.to_s+"="+v.to_s } if !params.empty?
|
56
|
+
params[0].each_pair { |k,v| param_list << "&"+k.to_s+"="+URI.encode(v.to_s) } if !params.empty?
|
56
57
|
url = "#{HOST}#{API}?method=youtube."+method+"&dev_id="+@dev_id+param_list
|
57
58
|
end
|
58
59
|
|
metadata
CHANGED