Let’s Shop Mapper is a Ruby library that allows to search and parse on Let’s Shop Service
gem install letsshop_mapper
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
Copyright © 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.