lib/icloud/session.rb
def login!(extended = false)
      uri = URI.parse("https://setup.icloud.com/setup/ws/1/login")
      payload = { "apple_id"=>@apple_id, "password"=>@pass, "extended_login"=>extended }

      response = http(uri.host, uri.port).post(uri.path, payload.to_json, default_headers)
      @cookies = response.get_fields("set-cookie")
      body = JSON.parse(response.body)

      @user = Records::DsInfo.from_icloud(body["dsInfo"])
      @services = parse_services(body["webservices"])

      true
    end
#
# Public: Logs in to icloud.com or raises some subclass of Net::HTTPError.
#
Logs in to icloud.com or raises some subclass of Net::HTTPError.
Logs in to icloud . com or raises some subclass of Net :: HTTPError .
def login!(extended = false)
      uri = URI.parse("https://setup.icloud.com/setup/ws/1/login")
      payload = { "apple_id"=>@apple_id, "password"=>@pass, "extended_login"=>extended }
      response = http(uri.host, uri.port).post(uri.path, payload.to_json, default_headers)
      @cookies = response.get_fields("set-cookie")
      body = JSON.parse(response.body)
      @user = Records::DsInfo.from_icloud(body["dsInfo"])
      @services = parse_services(body["webservices"])
      true
    end
def login! ( extended = false ) uri = URI . parse ( "https://setup.icloud.com/setup/ws/1/login" ) payload = { "apple_id" => @apple_id , "password" => @pass , "extended_login" => extended } response = http ( uri . host , uri . port ) . post ( uri . path , payload . to_json , default_headers ) @cookies = response . get_fields ( "set-cookie" ) body = JSON . parse ( response . body ) @user = Records :: DsInfo . from_icloud ( body [ "dsInfo" ] ) @services = parse_services ( body [ "webservices" ] ) true end
Public: Logs in to icloud.com or raises some subclass of Net::HTTPError.
Public : Logs in to icloud . com or raises some subclass of Net :: HTTPError .
extended