Skip to content

esampaio/affilinet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Affilinet

Alpha version of a gem to access the Affilinet JSON API.

Installation

Add this line to your application's Gemfile:

gem 'affilinet'

And then execute:

$ bundle

Or install it yourself as:

$ gem install affilinet

Usage

Examples replicating the instructions on the API Description

Basic setup

require 'affilinet'

client = Affilinet::Client.new publisher_id: 580442, password: '1TuKEGkOJJ24dN07ByOy'

Search products

result = client.search.query('jeans').all

# > result.products.first.brand
# => "Meat of the Room"

Get Products

result = client.products.product_ids([580858761,580858759]).all

# > result.products.first.price_information.display_price
# => "starting from 90.99 GBP "

Get Shop List

result = client.shops.all

# > result.shops.first.shop_title
# => "affilinet ShowCase"

Get Category List

result = client.categories.shop_id(0).all

# > result.categories.first.title
# => "Clothes & Accessories " 

Get Property List

result = client.properties.shop_id(1748).all

# result.property_counts.first.property_name
# => "Colour" 

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Gem for the Affilinet JSON API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages