Let's Shop Mapper is a Ruby library that allows to search and parse on Let's Shop Service
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
rails
test
.gitignore
LETSSHOP_MAPPER_VERSION
LICENSE
README.rdoc
Rakefile
init.rb
install.rb
letsshop_mapper.gemspec

README.rdoc

Let's Shop Mapper

About

Let's Shop Mapper is a Ruby library that allows to search and parse on Let's Shop Service

Install

gem install letsshop_mapper

Examples

lshop = LetsShopMapper::Connection::Base::new("hostname", "key")
lshop.find({:q => "robe", :start => 10, :nhits => 5, :f => "refine:'universe:mode',refine:'gender:femme'"})
lshop.feed.entries.each { |e| 
  puts "Id: #{e.id}\n"
  puts "Link: #{e.link}\n"
  puts "Title: #{e.title}\n"
  puts "Description: #{e.description}\n"
  puts "Thumbnail: #{e.thumb}\n"
  puts "Price: #{e.price}\n"
  puts "Supplier: #{e.supplier}\n"
  puts "------"
  puts "facets"
  puts "------"
  e.facets.each { |f|
    puts "Title: #{f.title}\n"
    puts "Type: #{f.type}\n"
    puts "Filter: #{f.filter.str_value}\n"
    puts "Role: #{f.role}\n"
    puts "Selected: #{f.selected}\n"
  }
  puts "-----------------------"
}

See also the test code, especially letsshop_mapper_test.rb

License

Copyright (C) 2010 Happun.

Licensed under the Apache License, Version 2.0 (the “LICENSE”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.