tagalys 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tagalys.rb +17 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 776648cd37a53215f6712dfe7f8c9e598f28c63499685c340c0a6a56ad7a9aa5
|
4
|
+
data.tar.gz: eedd2ca641eb52e88e29a2fa0674d9a11243c95b201b9e35a1404939aa2ec929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c7ab95e4e75a9402a207bb9298de9700a11a83f31c7c8c0899f8011b3eea57a04028aa9170105e63112851a36ba4e978bb3c47095cf297b75818f9e8ae6b3aa
|
7
|
+
data.tar.gz: 9824f389a265df032ade1b03bc432bb7dcd9108ab7c05da4cbcf4d6fbc918e29e435a81997a978a98cb9cfc26e70cd8bd49e80dea5664b3aefe3ca7cdc102b79
|
data/lib/tagalys.rb
CHANGED
@@ -108,7 +108,10 @@ module Tagalys
|
|
108
108
|
search_response = request_tagalys("/recommendations/bestsellers", request_body)
|
109
109
|
end
|
110
110
|
|
111
|
-
|
111
|
+
# recommendation_name can be one of the following
|
112
|
+
# new_arrivals, bestsellers, most_viewed, top_discounts_percentage,
|
113
|
+
# top_discounts_amount, recently_viewed
|
114
|
+
def get_recommendation(recommendation_name)
|
112
115
|
request_body = {
|
113
116
|
identification: identification,
|
114
117
|
max_products: 16,
|
@@ -117,9 +120,11 @@ module Tagalys
|
|
117
120
|
"results"
|
118
121
|
]
|
119
122
|
}.compact
|
120
|
-
search_response = request_tagalys("/recommendations/
|
123
|
+
search_response = request_tagalys("/recommendations/" + recommendation_name, request_body)
|
121
124
|
end
|
122
125
|
|
126
|
+
|
127
|
+
|
123
128
|
def create_store(currencies, fields, tag_sets, sort_options)
|
124
129
|
request_body = {
|
125
130
|
identification: identification,
|
@@ -151,6 +156,16 @@ module Tagalys
|
|
151
156
|
create_response = request_tagalys('/products/sync_updates', request_body)
|
152
157
|
end
|
153
158
|
|
159
|
+
def bulk_product_sync(link, product_count, callback_url = nil)
|
160
|
+
request_body = {
|
161
|
+
identification: identification,
|
162
|
+
link: link,
|
163
|
+
updates_count: product_count,
|
164
|
+
callback_url: callback_url
|
165
|
+
}
|
166
|
+
create_response = request_tagalys('/products/sync_feed', request_body)
|
167
|
+
end
|
168
|
+
|
154
169
|
def request_tagalys(path, request_body)
|
155
170
|
uri = URI.parse("https://api-r1.tagalys.com/v1" + path)
|
156
171
|
header = {'Content-Type': 'application/json'}
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tagalys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anbazhagan Palani
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-05-13 00:00:00.000000000 Z
|
@@ -22,7 +22,7 @@ homepage: https://github.com/commutatus/tagalys
|
|
22
22
|
licenses:
|
23
23
|
- MIT
|
24
24
|
metadata: {}
|
25
|
-
post_install_message:
|
25
|
+
post_install_message:
|
26
26
|
rdoc_options: []
|
27
27
|
require_paths:
|
28
28
|
- lib
|
@@ -37,8 +37,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
requirements: []
|
40
|
-
rubygems_version: 3.
|
41
|
-
signing_key:
|
40
|
+
rubygems_version: 3.2.3
|
41
|
+
signing_key:
|
42
42
|
specification_version: 4
|
43
43
|
summary: Tagalys gem is written for rails.
|
44
44
|
test_files: []
|