magento_rest_api 0.1.6.1 → 0.1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/magento_rest_api.rb +2 -2
- data/lib/magento_rest_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 984b754dbddd6b1c6923af4d234dbd6a5ee3689a
|
4
|
+
data.tar.gz: 1077ad34f77c08cda93b8a951cdc131b4b22bdc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f45d79fb3de44e8a68e9f75980fead35b5b3d999dd1788d9120a88807fe1df13edb4f7464359ca9146e0910cea1cf7b11aa04e09a3896b0c06206a4cbc6dd125
|
7
|
+
data.tar.gz: c3fab5d41a5c2aea3befbaf3b02a7069dc9b33f75f123df446e661bcd431cec957f306b33f7f57a93d2d9d60fbda966a280c552eb2d2ebfee1b2e81c034c5dc5
|
data/lib/magento_rest_api.rb
CHANGED
@@ -18,7 +18,7 @@ module MagentoRestApi
|
|
18
18
|
#% irb
|
19
19
|
# >> require 'restfull_oauth'
|
20
20
|
# >> service = RestfullOauth::Connection.new({"consumer_key"=>"your_consumer_key", "consumer_secret"=>"your_consumer_secret", "token"=>"your_token", "token_secret"=>"your_token_secret"})
|
21
|
-
# >> post_data = {'foo' => 'bar' }
|
21
|
+
# >> post_data = {'foo' => 'bar' }
|
22
22
|
# >> response = MagentoRestApi::connect('POST','https://your magento server/api/rest/products/200', post_data)
|
23
23
|
# => #<Net::HTTPOK 200 OK readbody=true>
|
24
24
|
# >> puts JSON.parse(response.body).to_yaml
|
@@ -40,7 +40,7 @@ module MagentoRestApi
|
|
40
40
|
signing_key = @config['consumer_secret'] + '&' + @config['token_secret']
|
41
41
|
params['oauth_signature'] = url_encode(sign(signing_key, signature_base_string))
|
42
42
|
header_string = create_header(params)
|
43
|
-
json_response = request_data(header_string, uri, method, post_data)
|
43
|
+
json_response = request_data(header_string, uri, method, post_data.to_json)
|
44
44
|
end
|
45
45
|
|
46
46
|
private
|