linkshare-oauth2-api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +46 -59
- data/lib/linkshare/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c9e4c11a42fb786f0278c60e881e04481aec6cf
|
4
|
+
data.tar.gz: 2c415a5b8fa3636a1d73e52a7b798fd161a5c03a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1555242669007040e4827161935e3628b6620044ad2fd3e3ff8ceb382d5e6758f3d679d8f971fde9cfe38f34eec2685826b7cb4572aa8e602abed3e33c65d1b5
|
7
|
+
data.tar.gz: 385ecbed5eb1e49d1e6f08cb1a09c39c670d02f3dd3a8b6bc1b61501c7edb2ecda05be10bd85f5fe4836911e569813e67a2c4f2c41eea0dc32c1197b96707939
|
data/README.rdoc
CHANGED
@@ -1,25 +1,18 @@
|
|
1
1
|
= Linkshare
|
2
2
|
|
3
3
|
A Ruby implementation of the Rakutan Linkshare API's. This gem provides access to the following APIs:
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
|
11
|
-
[advancedreport]: https://developers.rakutenmarketing.com/subscribe/apis/info?name=AdvancedReports&version=1.0&provider=LinkShare
|
12
|
-
[coupons]: https://developers.rakutenmarketing.com/subscribe/apis/info?name=Coupon&version=1.0&provider=LinkShare
|
13
|
-
[linklocator]: https://developers.rakutenmarketing.com/subscribe/apis/info?name=LinkLocator&version=1.0&provider=LinkShare
|
14
|
-
[prsoductsearch]: https://developers.rakutenmarketing.com/subscribe/apis/info?name=ProductSearch&version=1.0&provider=LinkShare
|
15
|
-
[advancedsearch]: https://developers.rakutenmarketing.com/subscribe/apis/info?name=AdvertiserSearch&version=1.0&provider=LinkShare
|
16
|
-
[event]: https://developers.rakutenmarketing.com/subscribe/apis/info?name=Events&version=1.0&provider=LinkShare
|
4
|
+
* {Advanced Reports - 1.0}[https://developers.rakutenmarketing.com/subscribe/apis/info?name=AdvancedReports&version=1.0&provider=LinkShare]
|
5
|
+
* {Coupons - 1.0}[https://developers.rakutenmarketing.com/subscribe/apis/info?name=Coupon&version=1.0&provider=LinkShare]
|
6
|
+
* {Link Locator - 1.0}[https://developers.rakutenmarketing.com/subscribe/apis/info?name=LinkLocator&version=1.0&provider=LinkShare]
|
7
|
+
* {Product Search - 1.0}[https://developers.rakutenmarketing.com/subscribe/apis/info?name=ProductSearch&version=1.0&provider=LinkShare]
|
8
|
+
* {Advertiser Search - 1.0}[https://developers.rakutenmarketing.com/subscribe/apis/info?name=AdvertiserSearch&version=1.0&provider=LinkShare]
|
9
|
+
* {Events - 1.0}[https://developers.rakutenmarketing.com/subscribe/apis/info?name=Events&version=1.0&provider=LinkShare]
|
10
|
+
|
17
11
|
|
18
12
|
## Before You Begin
|
19
13
|
|
20
|
-
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
|
14
|
+
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}[https://developers.rakutenmarketing.com/console/registry/resource/_system/governance/apimgt/applicationdata/provider/RakutenMarketing/artifacts/API_Developer_Portal-Acquiring_Your_Access_Token_Guide.pdf] document
|
21
15
|
|
22
|
-
[accesstoken]: https://developers.rakutenmarketing.com/console/registry/resource/_system/governance/apimgt/applicationdata/provider/RakutenMarketing/artifacts/API_Developer_Portal-Acquiring_Your_Access_Token_Guide.pdf
|
23
16
|
|
24
17
|
You will need the following peices of information:
|
25
18
|
* AccountID (SID or MID)
|
@@ -33,70 +26,64 @@ You will need the following peices of information:
|
|
33
26
|
|
34
27
|
To install **linkshare**, run the following command:
|
35
28
|
|
36
|
-
|
37
|
-
gem install linkshare
|
38
|
-
|
29
|
+
|
30
|
+
gem install linkshare-ouath2-api
|
31
|
+
|
39
32
|
|
40
33
|
Or if you are using **bundler**, add
|
41
34
|
|
42
|
-
|
43
|
-
gem 'linkshare'
|
44
|
-
|
35
|
+
|
36
|
+
gem 'linkshare-ouath2-api'
|
37
|
+
|
45
38
|
|
46
39
|
to your `Gemfile`, and run `bundle install`
|
47
40
|
|
48
41
|
Then add the following code to an initializer:
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
42
|
+
|
43
|
+
require 'linkshare'
|
44
|
+
Linkshare.consumer_key = "#########################"
|
45
|
+
Linkshare.consumer_secret = "#########################"
|
46
|
+
Linkshare.sid = "1234567"
|
47
|
+
Linkshare.username = "username"
|
48
|
+
Linkshare.password = "password"
|
49
|
+
Linkshare.security_token = "#############################################"
|
50
|
+
|
58
51
|
|
59
52
|
## Usage Examples
|
60
53
|
|
61
|
-
```ruby
|
62
|
-
require 'linkshare'
|
63
54
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
55
|
+
require 'linkshare'
|
56
|
+
|
57
|
+
# Coupons API
|
58
|
+
coupn = Linkshare.coupon
|
59
|
+
coupn.fetch
|
60
|
+
coupn.getCoupons
|
68
61
|
|
69
|
-
|
62
|
+
...
|
70
63
|
|
71
|
-
|
72
|
-
|
64
|
+
# Link Locator API
|
65
|
+
merchants = Linkshare.linklocator.getMerchByAppStatus(:approved)
|
73
66
|
|
74
|
-
|
75
|
-
|
76
|
-
# Advanced Reports API
|
77
|
-
report = Linkshare.advancedreports.fetchReports(6, '20150101', '20160101')
|
67
|
+
...
|
78
68
|
|
79
|
-
|
69
|
+
# Advanced Reports API
|
70
|
+
report = Linkshare.advancedreports.fetchReports(6, '20150101', '20160101')
|
80
71
|
|
81
|
-
|
82
|
-
products = Linkshare.productsearch
|
83
|
-
products.addKeyword('Toy','keyword')
|
84
|
-
products.getProducts
|
72
|
+
...
|
85
73
|
|
86
|
-
|
74
|
+
# Product Search API
|
75
|
+
products = Linkshare.productsearch
|
76
|
+
products.addKeyword('Toy','keyword')
|
77
|
+
products.getProducts
|
87
78
|
|
88
|
-
|
89
|
-
events = Linkshare.events.getEvents
|
79
|
+
...
|
90
80
|
|
91
|
-
|
81
|
+
# Events API
|
82
|
+
events = Linkshare.events.getEvents
|
92
83
|
|
93
|
-
|
94
|
-
advertiser = Linkshare.advertisersearch.getAdvertisers ("Example Store")
|
95
|
-
```
|
84
|
+
...
|
96
85
|
|
86
|
+
# Advertiser Search API
|
87
|
+
advertiser = Linkshare.advertisersearch.getAdvertisers ("Example Store")
|
97
88
|
|
98
|
-
## License
|
99
|
-
Copyright (c) 2015 Rudie Shahinian. See [LICENSE][] for
|
100
|
-
details.
|
101
89
|
|
102
|
-
[license]: LICENSE.md
|
data/lib/linkshare/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linkshare-oauth2-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rudie Shahinian
|
@@ -113,7 +113,7 @@ files:
|
|
113
113
|
- test/dummy/public/favicon.ico
|
114
114
|
- test/linkshare_test.rb
|
115
115
|
- test/test_helper.rb
|
116
|
-
homepage:
|
116
|
+
homepage: https://github.com/rudical/linkshare-oauth2-api
|
117
117
|
licenses:
|
118
118
|
- MIT
|
119
119
|
metadata: {}
|