Class: CareerBuilder::Requests::Authentication
- Inherits:
-
CareerBuilder::Request
- Object
- CareerBuilder::Request
- CareerBuilder::Requests::Authentication
- Defined in:
- lib/career_builder/requests/authentication.rb
Constant Summary
Constants inherited from CareerBuilder::Request
CareerBuilder::Request::RESUME_SERVICE_ENDPOINT_URL
Instance Attribute Summary
Attributes inherited from CareerBuilder::Request
Instance Method Summary collapse
Methods inherited from CareerBuilder::Request
Constructor Details
This class inherits a constructor from CareerBuilder::Request
Instance Method Details
#perform ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/career_builder/requests/authentication.rb', line 7 def perform response = perform_request("BeginSessionV2", "<Email>#{[:email]}</Email><Password>#{[:password]}</Password>") packet = Nokogiri::XML(response) if session_token = packet.search("//SessionToken") session_token_text = session_token.text if session_token_text == "Invalid" return nil else return session_token_text end end end |