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 +4 -4
- data/README.rdoc +2 -2
- data/lib/lomadee/base.rb +3 -2
- data/lib/lomadee/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d927b673a23281f616a98297e19ca65599262c70
|
4
|
+
data.tar.gz: 59f935cd8e0bfc071ac6bb1cda3994d06195c466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc063b506b0bf2100ef78cacc7d19fc5a9f350c2bef158b888fc988b8b772cbb675f2ac251c4a7af0ed6fccdecfbe9d525963b41493fa033d73607afd82539c9
|
7
|
+
data.tar.gz: c7f732c9b4b64b832e67906d96ea9af9d732793633e5ee798a44c24c223bd2b13a9f3dc5748a7c857321c2497feadb71779ee2ad41ed7c6c9814df2f52240dd8
|
data/README.rdoc
CHANGED
@@ -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.
|
19
|
+
lomadee.offers(categoryId: 77)
|
20
20
|
|
21
21
|
This get all products in the cellphone category. Or like this:
|
22
22
|
|
23
|
-
|
23
|
+
lomadee.products(keyword: "Apple")
|
24
24
|
|
25
25
|
This get all products using the keyword "Apple"
|
26
26
|
|
data/lib/lomadee/base.rb
CHANGED
@@ -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}"
|
data/lib/lomadee/version.rb
CHANGED
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
|
+
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-
|
11
|
+
date: 2013-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|