Sha256: cbc980aeeeace3c374f642c2fea18ec0fb10ebd409f45c841f6602c5ea8b7229

Contents?: true

Size: 743 Bytes

Versions: 4

Compression:

Stored size: 743 Bytes

Contents

module SodaXmlTeam

  require 'httparty'
  require 'nokogiri'

  class Client

    def initialize(username, password)
      @auth = {:username => username, :password => password}
      @dir = File.dirname __FILE__
    end

    def get_listing(options={})
      response = HTTParty.get(SodaXmlTeam::Address.build("get_listing", options), :basic_auth => @auth, :ssl_ca_file => "#{@dir}/../ca-certificates.crt", :ssl_version => :SSLv3)
      Nokogiri::XML(response.body)
    end

    def get_document(options={})
      response = HTTParty.get(SodaXmlTeam::Address.build("get_document", options), :basic_auth => @auth, :ssl_ca_file => "#{@dir}/../ca-certificates.crt", :ssl_version => :SSLv3)
      Nokogiri::XML(response.body)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
soda_xml_team-1.2.0 lib/soda_xml_team/client.rb
soda_xml_team-1.1.0 lib/soda_xml_team/client.rb
soda_xml_team-1.0.8 lib/soda_xml_team/client.rb
soda_xml_team-1.0.7 lib/soda_xml_team/client.rb