lomadee 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1f6d5f0654e9c17f98492248a370547c996d905
4
- data.tar.gz: 8c95afdf52adb44a8a342ec3dd0a5928edd63c22
3
+ metadata.gz: d927b673a23281f616a98297e19ca65599262c70
4
+ data.tar.gz: 59f935cd8e0bfc071ac6bb1cda3994d06195c466
5
5
  SHA512:
6
- metadata.gz: bae6c5f0d91597f9f8904dbc08d1ef073adc4d40347b2df1756bb14b780ce4f0cb850231fc97b2cac344f13a17ed881fb22a15e6c7c2e2f5cbe4b0a8e3932e7a
7
- data.tar.gz: ca571e85df7fcac0cbdc8e8b1de40b3cc65e9b0479138b53e064fb29fb443dbd7256bf6a0ae640e2295eee8e7f094631e2a028bc4feb15ddeb770961e895d1d9
6
+ metadata.gz: bc063b506b0bf2100ef78cacc7d19fc5a9f350c2bef158b888fc988b8b772cbb675f2ac251c4a7af0ed6fccdecfbe9d525963b41493fa033d73607afd82539c9
7
+ data.tar.gz: c7f732c9b4b64b832e67906d96ea9af9d732793633e5ee798a44c24c223bd2b13a9f3dc5748a7c857321c2497feadb71779ee2ad41ed7c6c9814df2f52240dd8
@@ -16,11 +16,11 @@ First instantiate a new 'Lomadee::Base' object with two parameters (application_
16
16
 
17
17
  Then you can use like this:
18
18
 
19
- lomadee.category(77).products
19
+ lomadee.offers(categoryId: 77)
20
20
 
21
21
  This get all products in the cellphone category. Or like this:
22
22
 
23
- lomadee.keyword("Apple").products
23
+ lomadee.products(keyword: "Apple")
24
24
 
25
25
  This get all products using the keyword "Apple"
26
26
 
@@ -2,10 +2,11 @@ module Lomadee
2
2
  class Base
3
3
  include HTTParty
4
4
 
5
- def initialize(application_id, sandbox = false)
5
+ def initialize(application_id, sandbox = false, country = "BR")
6
6
  raise "You need to inform your :application_id" if application_id.nil?
7
7
 
8
8
  @env = (sandbox) ? 'sandbox' : 'bws'
9
+ @country = country
9
10
 
10
11
  @application_id = application_id
11
12
 
@@ -43,7 +44,7 @@ module Lomadee
43
44
 
44
45
  @uris[method] = "viewSellerDetails" if method === :details && !@data[:seller].blank? && @data[:product].blank?
45
46
 
46
- url = "http://#{@env}.buscape.com/service/#{@uris[method]}/lomadee/#{@application_id}/"
47
+ url = "http://#{@env}.buscape.com/service/#{@uris[method]}/lomadee/#{@application_id}/#{@country}/"
47
48
 
48
49
  @data.each { |sym, value|
49
50
  url += ((url[-1, 1] == "/") ? "?" : "&") + "#{(@params[sym].nil?) ? sym.to_s : @params[sym]}=#{value}"
@@ -1,3 +1,3 @@
1
1
  module Lomadee
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lomadee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno A. da Costa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-14 00:00:00.000000000 Z
11
+ date: 2013-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty