tagalys 0.2.3 → 0.2.5
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 +15 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe16f4c982d1c3a23f990e20661cdefa3d8206925eb94afa1fe4e060b4d16a2d
|
4
|
+
data.tar.gz: b168f4ffb34a3385b3e8f74a95a93e33d445058e741eae14e7bf3c25d874ec31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1ed8ad7b2ca8b9a85178eacf3b85065a960a706077cd74cc59b318736c872c0736a25d2c4a35e6b66791cb32b9a9f91cd8ac19212f9f3131227ab1ffdd9ed3
|
7
|
+
data.tar.gz: 99bebbde10b862695066a9e8f55f1ad73a231ab6a2fd470cd302d0027433456f55850fd6f3248f77ccc918c68aa89028cc3eaa27f519adfc4b0f47c3e7927beb
|
data/lib/tagalys.rb
CHANGED
@@ -123,6 +123,21 @@ module Tagalys
|
|
123
123
|
search_response = request_tagalys("/recommendations/" + recommendation_name, request_body)
|
124
124
|
end
|
125
125
|
|
126
|
+
# Please contact Tagalys to enable this feature.
|
127
|
+
# the recommendation_id can be obtained from the Tagalys dashboard via the embed code for the merchandisable similar product feature
|
128
|
+
def get_recommendations_for_product(product_id, recommendation_id)
|
129
|
+
request_body = {
|
130
|
+
identification: identification,
|
131
|
+
max_products: 16,
|
132
|
+
product_id: product_id,
|
133
|
+
request: [
|
134
|
+
"details",
|
135
|
+
"results"
|
136
|
+
]
|
137
|
+
}.compact
|
138
|
+
search_response = request_tagalys("/recommendations/" + recommendation_id, request_body)
|
139
|
+
end
|
140
|
+
|
126
141
|
|
127
142
|
|
128
143
|
def create_store(currencies, fields, tag_sets, sort_options)
|
@@ -172,7 +187,6 @@ module Tagalys
|
|
172
187
|
http = Net::HTTP.new(uri.host, uri.port)
|
173
188
|
http.use_ssl = true
|
174
189
|
request = Net::HTTP::Post.new(uri.request_uri, header)
|
175
|
-
puts request_body.to_json
|
176
190
|
request.body = request_body.to_json
|
177
191
|
# Send the request
|
178
192
|
response = http.request(request)
|