Module: Picasa::HTTP::Authentication

Defined in:
lib/picasa/http/authentication.rb

Constant Summary collapse

HTTPS_PORT =
443
PICASA_SERVICE =
'lh2'
APP_NAME =
'BandManager'

Class Method Summary collapse

Class Method Details

.authenticate(email, password) ⇒ Object

Do a post request to authenticate user with the e-mail and password provided and return the response and data of the request



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/picasa/http/authentication.rb', line 16

def self.authenticate email, password
  uri = 
  
  http = Net::HTTP.new(uri.host, HTTPS_PORT)
  http.use_ssl=true

  data =  email, password
  
  headers = {'Content-Type' => 'application/x-www-form-urlencoded'}
  resp, data = http.post(uri.path, data, headers)
end