tagalys 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tagalys.rb +17 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dcbe9fe59b633d62622ddf5e09c491b760fecbc93abd77db699d4bd8ff15e40c
|
|
4
|
+
data.tar.gz: 1a50d9956d7220515e1c10c9bb14afc7bfa3b38e62d298491ea0ab1a75fa7b01
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55998d25eaf6317ec0770ac5b75509b0a1e6110a454f21822844459fe1968f9b50dbb44ffa7b35c08e944e3926ca344402b35ed5f300740ab79b138664a8d62f
|
|
7
|
+
data.tar.gz: e11021fc2ea4a8357c8422d79bba01b16be62d0b0dcccf36b6c6313afb9142c9a269ca59161fcaf61945cc870bd0bc55c32bc90f6702b1c9554f993cdefb4e47
|
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,7 +1,7 @@
|
|
|
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.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anbazhagan Palani
|
|
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
38
|
version: '0'
|
|
39
39
|
requirements: []
|
|
40
|
-
rubygems_version: 3.0.
|
|
40
|
+
rubygems_version: 3.0.3
|
|
41
41
|
signing_key:
|
|
42
42
|
specification_version: 4
|
|
43
43
|
summary: Tagalys gem is written for rails.
|