Project

affilinet

0.0
No commit activity in last 3 years
No release in over 3 years
Gem to access the rest (actually only get but...) API of affilinet
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0
>= 0

Runtime

 Project Readme

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