Sha256: 06b7f68c33afd7756678d261a67ea36730f1366ffc1f5703d1d040293bc407ec

Contents?: true

Size: 699 Bytes

Versions: 2

Compression:

Stored size: 699 Bytes

Contents

module SodaXmlTeam

  require 'httparty'
  require 'nokogiri'
  
  class Client
    
    include HTTParty
    debug_output $stderr

    def initialize(username, password)
      @auth = {:username => username, :password => password}
      @certs = 'lib/ca-bundle.crt'
    end
    
    def get_listing(options={})
      response = HTTParty.get(SodaXmlTeam::Address.build("get_listing", options), :basic_auth => @auth, :ssl_ca_file => @certs)
      Nokogiri::XML(response.body)
    end

    def get_document(options={})
      response = HTTParty.get(SodaXmlTeam::Address.build("get_document", options), :basic_auth => @auth, :ssl_ca_file => @certs)
      Nokogiri::XML(response.body)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
soda_xml_team-1.0.3 lib/soda_xml_team/client.rb
soda_xml_team-1.0.2 lib/soda_xml_team/client.rb