tagalys 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tagalys.rb +17 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b70649ed6fffedbe1fa0eba873cf29b8d28b98e646b9f1114fd723362e24a461
4
- data.tar.gz: 525c3a0340011841a19b6e19551621016e4d6b7f601dfbc5fad7dbe1f704365b
3
+ metadata.gz: dcbe9fe59b633d62622ddf5e09c491b760fecbc93abd77db699d4bd8ff15e40c
4
+ data.tar.gz: 1a50d9956d7220515e1c10c9bb14afc7bfa3b38e62d298491ea0ab1a75fa7b01
5
5
  SHA512:
6
- metadata.gz: a732337202db2bd2c3711f78afdcd818ecd1636bd1e8411032cfa9b513b9bf8e04f2b0fdf6c03e017d03f5e32042f722aedcf8634f0d68a102c993433d1b8391
7
- data.tar.gz: 6ecd6eb38f1717d3a59e6a193abdd3299b5a8ebdb38b30def1516a3b83edabe2895659636fa415eb76a89b2bdd8929c742a66eaa93af4c4ad778aecf8502f6f9
6
+ metadata.gz: 55998d25eaf6317ec0770ac5b75509b0a1e6110a454f21822844459fe1968f9b50dbb44ffa7b35c08e944e3926ca344402b35ed5f300740ab79b138664a8d62f
7
+ data.tar.gz: e11021fc2ea4a8357c8422d79bba01b16be62d0b0dcccf36b6c6313afb9142c9a269ca59161fcaf61945cc870bd0bc55c32bc90f6702b1c9554f993cdefb4e47
@@ -108,7 +108,10 @@ module Tagalys
108
108
  search_response = request_tagalys("/recommendations/bestsellers", request_body)
109
109
  end
110
110
 
111
- def get_new_arrivals
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/new_arrivals", request_body)
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.1
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.1
40
+ rubygems_version: 3.0.3
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: Tagalys gem is written for rails.