Sha256: 60672eda87ed78a99ccf14b5ab5202590cb4dba52988b7ab1e6e33de0cb9da8f

Contents?: true

Size: 691 Bytes

Versions: 8

Compression:

Stored size: 691 Bytes

Contents

require "httparty"
require "uri"

module Picasa
  class HTTP
    include HTTParty

    API_URL      = "https://picasaweb.google.com"
    API_AUTH_URL = "https://www.google.com"
    API_VERSION  = "2"

    def self.proxy
      proxy_uri = URI.parse(ENV["https_proxy"] || ENV["HTTPS_PROXY"] || "")
      [proxy_uri.host, proxy_uri.port, proxy_uri.user, proxy_uri.password]
    end

    format         :json
    default_params :alt => :json

    headers        "User-Agent"      => "ruby-gem-picasa-v#{VERSION} (gzip)",
                   "GData-Version"   => API_VERSION,
                   "Accept-Encoding" => "gzip, deflate"

    base_uri       API_URL

    http_proxy     *proxy
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
picasa-0.6.7 lib/picasa/http.rb
picasa-0.6.6 lib/picasa/http.rb
picasa-0.6.5 lib/picasa/http.rb
picasa-0.6.4 lib/picasa/http.rb
picasa-0.6.3 lib/picasa/http.rb
picasa-0.6.2 lib/picasa/http.rb
picasa-0.6.1 lib/picasa/http.rb
picasa-0.6.0 lib/picasa/http.rb