artifacia 0.1.2.2 → 0.1.6.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/artifacia.gemspec +1 -1
  3. data/lib/artifacia.rb +5 -5
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ebbd4111b539a634d45c6e8a170d4845c9dd0b6f
4
- data.tar.gz: 091102688677fe99e07fe232a9bacd7668cd6a7f
3
+ metadata.gz: d30dc36e329b184bbc5070f3fd403182a03a996b
4
+ data.tar.gz: 6e2ecfa6cce6b59b2d1b07182766ef0c7735e6e4
5
5
  SHA512:
6
- metadata.gz: 6696f3d63cacd4c786cf5ea60c5dbb182c8cf9e40907fe8f0aa578cd4131a22c4eddb55aca591abc2cc6117b6cfca5c69a8686ce80156d28f3f1e228d3ce564e
7
- data.tar.gz: ba6e4212bd4ad519738860df5f693e45702ce984fb049e70022987da4a679cfbe6766348d61d31b487bf4156a7bd68cdccf36f1c09133dad754dc9251f86ed69
6
+ metadata.gz: 4d232a6934a7b8e9a87f9350e52bcd6a0f14de99f15615c013975d951542dee8258b81be62bf67cf8b7c1bcaac3fa7e762978b12bd8ff9cc2e909c5e0e8e4eaa
7
+ data.tar.gz: 80a469eea974ebf74ceed9826e56702d9058401893a2d52e844effa6b798f98fe7cee042ffb05fe622ccb94fbe956562e5f8f4080006012531771450ffd271f6
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'artifacia'
3
- s.version = '0.1.2.2'
3
+ s.version = '0.1.6.1'
4
4
  s.date = Date.today
5
5
  s.summary = "Artifacia!"
6
6
  s.description = "A ruby client to integrate visual recommendation feature from Artifacia API"
@@ -43,12 +43,12 @@ class Client
43
43
  return response.body
44
44
  end
45
45
 
46
- def get_visual_recommendation(prod_id, num, filters)
47
- @post_ws = "/v1/recommendation/similar/#{prod_id}/#{num}?"
48
- filters.each do |key, value|
49
- @post_ws = @post_ws+"#{key}=#{value}&"
46
+ def get_visual_recommendation(prod_id, num, filters = Hash.new)
47
+ @post_ws = "/v1/recommendation/similar/#{prod_id}/#{num}"
48
+ puts filters["filters"]
50
49
 
51
- req = Net::HTTP::Get.new(@post_ws, initheader = {'api_key' => @api_key})
50
+ req = Net::HTTP::Post.new(@post_ws, initheader = {'api_key' => @api_key})
51
+ req.body = {"filters" =>filters}.to_json
52
52
  response = @http.request(req)
53
53
  return response.body
54
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artifacia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.2
4
+ version: 0.1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashish Kumar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-12 00:00:00.000000000 Z
11
+ date: 2016-11-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A ruby client to integrate visual recommendation feature from Artifacia
14
14
  API