linkshare-oauth2-api 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +8 -2
- data/lib/linkshare/custom_reports.rb +1 -1
- data/lib/linkshare/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aac148207bf1393583c7c27460a1af0e021d11e5
|
4
|
+
data.tar.gz: c05c25103577df3ea1ce951202a3bb7ff2b8d9c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96b5385aa09d3266e367baad1ac719bd88b4bfe97382da48f86f6e47168f492fdb90fe54ab197040d4a291a919f02edbc6b29192c18b485310643a52d9e388a5
|
7
|
+
data.tar.gz: 3db764a1ab48bb1b3d882312edba0453fc61bd738ca36448ab14068617f9b2515622339e4b2bc91804ea7613a8ddc08e590ef0c00253b0c40366bc77db1e683b
|
data/README.rdoc
CHANGED
@@ -27,13 +27,13 @@ You will need the following peices of information:
|
|
27
27
|
To install **linkshare**, run the following command:
|
28
28
|
|
29
29
|
|
30
|
-
gem install linkshare-
|
30
|
+
gem install linkshare-oauth2-api
|
31
31
|
|
32
32
|
|
33
33
|
Or if you are using **bundler**, add
|
34
34
|
|
35
35
|
|
36
|
-
gem 'linkshare-
|
36
|
+
gem 'linkshare-oauth2-api'
|
37
37
|
|
38
38
|
|
39
39
|
to your `Gemfile`, and run `bundle install`
|
@@ -47,6 +47,7 @@ Then add the following code to an initializer:
|
|
47
47
|
Linkshare.username = "username"
|
48
48
|
Linkshare.password = "password"
|
49
49
|
Linkshare.security_token = "#############################################"
|
50
|
+
Linkshare.custom_report_token = "##################################################################################"
|
50
51
|
|
51
52
|
|
52
53
|
## Usage Examples
|
@@ -71,6 +72,11 @@ Then add the following code to an initializer:
|
|
71
72
|
|
72
73
|
...
|
73
74
|
|
75
|
+
# Custom Reports API
|
76
|
+
report = Linkshare.customreports.fetchReports('custom-report-name', '2016-01-27', '2016-01-27', 5)
|
77
|
+
|
78
|
+
...
|
79
|
+
|
74
80
|
# Product Search API
|
75
81
|
products = Linkshare.productsearch
|
76
82
|
products.addKeyword('Toy','keyword')
|
@@ -19,7 +19,7 @@ module Linkshare
|
|
19
19
|
@reportsRows = []
|
20
20
|
@reportsCSV = open(url).read()
|
21
21
|
reportsrows = @reportsCSV.force_encoding("UTF-8").gsub("\"",'').split(/\n/)
|
22
|
-
if reportsrows[1].match(/^\{code\:.*\}$/)
|
22
|
+
if !reportsrows[1].nil? && reportsrows[1].match(/^\{code\:.*\}$/)
|
23
23
|
raise 'Linkshare Error (custom report): ' + reportsrows[1]
|
24
24
|
end
|
25
25
|
@cols = reportsrows[0].split(/,/)
|
data/lib/linkshare/version.rb
CHANGED