OAS Ruby Client Build Status Dependency Status

Ruby client for the OpenAdstream API

Installation

oas is available through Rubygems and can be installed via:

gem install oas

Usage Example

require "oas"
require "pp"

# Configure OAS
OAS.configure do |config|
  config.endpoint = OAS_ENDPOINT
  config.  = OAS_ACCOUNT
  config.username = OAS_USERNAME
  config.password = OAS_PASSWORD
end

# Build OAS message (Ex: Nokogiri)
msg = Nokogiri::XML::Builder.new(:encoding => "utf-8") do |xml|
  xml.AdXML {
    xml.Request(:type => 'Site') {
      xml.Database(:action => 'list') {
        xml.SearchCriteria {
          xml.Id "%"
        }
      }
    }
  }
end

# Make request
pp OAS.client.request(msg).to_hash

Copyright (c) 2011 Realmedia Latin America. See LICENSE for details.