Alpha version of a gem to access the Affilinet JSON API.
Add this line to your application's Gemfile:
gem 'affilinet'
And then execute:
$ bundle
Or install it yourself as:
$ gem install affilinet
Examples replicating the instructions on the API Description
require 'affilinet'
client = Affilinet::Client.new publisher_id: 580442, password: '1TuKEGkOJJ24dN07ByOy'
result = client.search.query('jeans').all
# > result.products.first.brand
# => "Meat of the Room"
result = client.products.product_ids([580858761,580858759]).all
# > result.products.first.price_information.display_price
# => "starting from 90.99 GBP "
result = client.shops.all
# > result.shops.first.shop_title
# => "affilinet ShowCase"
result = client.categories.shop_id(0).all
# > result.categories.first.title
# => "Clothes & Accessories "
result = client.properties.shop_id(1748).all
# result.property_counts.first.property_name
# => "Colour"
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request