Skip to content

Instantly share code, notes, and snippets.

@zeero
Created July 25, 2011 08:58
Show Gist options
  • Save zeero/1103793 to your computer and use it in GitHub Desktop.
Save zeero/1103793 to your computer and use it in GitHub Desktop.
require 'open-uri'
# check args
if ARGV[0] == nil || ARGV[0] == ""
exit
end
# main
url = URI.escape(ARGV[0])
api_url = "https://readitlaterlist.com/v2/add?username=zeero26&password=jirojiro&apikey=012A9b0Vd2431P3430paXy2Jh6Txx327&url=#{url}" # => "https://readitlaterlist.com/v2/add?username=zeero26&password=jirojiro&apikey=012A9b0Vd2431P3430paXy2Jh6Txx327&url=http://google.com"
open(api_url, {:proxy => "http://proxy_url:8080"}).read.display
# >> 200 OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment