No commit activity in last 3 years
No release in over 3 years
Provides Rakuten Linkshare OAuth2 API's for Coupons, Link Locator, Products Search, Advanced Reports, Advertiser search, and Events.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.0
~> 4.2
 Project Readme

Linkshare¶ ↑

A Ruby implementation of the Rakutan Linkshare API’s. This gem provides access to the following APIs:

## Before You Begin

You will require an account with Linkshare, subscriptions to the API’s and OAuth2 credentials which can be obtained by followng the instructions in the Aquiring your Access Token document

You will need the following peices of information:

  • AccountID (SID or MID)

  • Account Username

  • Account Password

  • Consumer Key

  • Consumer Secret

  • Security Token

## Installation

To install linkshare, run the following command:

gem install linkshare-oauth2-api

Or if you are using bundler, add

gem 'linkshare-oauth2-api'

to your ‘Gemfile`, and run `bundle install`

Then add the following code to an initializer:

require 'linkshare'
Linkshare.consumer_key = "#########################"
Linkshare.consumer_secret = "#########################"
Linkshare.sid = "1234567"
Linkshare.username = "username"
Linkshare.password = "password"
Linkshare.security_token = "#############################################"
Linkshare.custom_report_token = "##################################################################################"

## Usage Examples

require 'linkshare'

# Coupons API
coupn = Linkshare.coupon
coupn.fetch
coupn.getCoupons

...

# Link Locator API
merchants = Linkshare.linklocator.getMerchByAppStatus(:approved) 

...

# Advanced Reports API
report = Linkshare.advancedreports.fetchReports(6, '20150101', '20160101')

...

# Custom Reports API
report = Linkshare.customreports.fetchReports('custom-report-name', '2016-01-27', '2016-01-27', 5)

...

# Product Search API
products = Linkshare.productsearch
products.addKeyword('Toy','keyword')
products.getProducts

...

# Events API
events = Linkshare.events.getEvents

...

# Advertiser Search API
advertiser = Linkshare.advertisersearch.getAdvertisers ("Example Store")