Class: SodaXmlTeam::Client
- Inherits:
-
Object
- Object
- SodaXmlTeam::Client
- Includes:
- HTTParty
- Defined in:
- lib/soda_xml_team/client.rb
Direct Known Subclasses
Instance Method Summary collapse
- #get_document(options = {}) ⇒ Object
- #get_listing(options = {}) ⇒ Object
-
#initialize(username, password) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(username, password) ⇒ Client
11 12 13 14 |
# File 'lib/soda_xml_team/client.rb', line 11 def initialize(username, password) @auth = {:username => username, :password => password} @certs = 'lib/ca-bundle.crt' end |
Instance Method Details
#get_document(options = {}) ⇒ Object
21 22 23 24 |
# File 'lib/soda_xml_team/client.rb', line 21 def get_document(={}) response = HTTParty.get(SodaXmlTeam::Address.build("get_document", ), :basic_auth => @auth, :ssl_ca_file => @certs) Nokogiri::XML(response.body) end |
#get_listing(options = {}) ⇒ Object
16 17 18 19 |
# File 'lib/soda_xml_team/client.rb', line 16 def get_listing(={}) response = HTTParty.get(SodaXmlTeam::Address.build("get_listing", ), :basic_auth => @auth, :ssl_ca_file => @certs) Nokogiri::XML(response.body) end |