youtube 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. data/dirtywork.rb +2 -1
  2. metadata +1 -1
@@ -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
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: youtube
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
6
+ version: 0.1.1
7
7
  date: 2006-09-27 00:00:00 -05:00
8
8
  summary: An interface in Ruby to the YouTube REST API. By Shane Vitarana.
9
9
  require_paths: