easypost 1.0.8 → 1.1.0
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.
- data/lib/easypost.rb +1 -7
- metadata +3 -3
data/lib/easypost.rb
CHANGED
@@ -3,7 +3,7 @@ require 'json'
|
|
3
3
|
|
4
4
|
module EasyPost
|
5
5
|
@@api_key = "..."
|
6
|
-
@@api_base = '
|
6
|
+
@@api_base = 'https://www.geteasypost.com/api/'
|
7
7
|
|
8
8
|
def self.api_url(args={})
|
9
9
|
raise ArgumentError unless args.keys.eql?([:type, :action])
|
@@ -39,18 +39,12 @@ module EasyPost
|
|
39
39
|
def self.get(url, params={})
|
40
40
|
params = {:userpwd => @@api_key, :params => params}
|
41
41
|
@response = Typhoeus::Request.get(url, params)
|
42
|
-
puts "EasyPost Response Body: "
|
43
|
-
puts @response.body
|
44
|
-
puts "End of Body"
|
45
42
|
return EasyPost.symbolize_keys_recursive(JSON.parse(@response.body))
|
46
43
|
end
|
47
44
|
|
48
45
|
def self.post(url, params={})
|
49
46
|
params = {:userpwd => @@api_key, :params => params}
|
50
47
|
@response = Typhoeus::Request.post(url, params)
|
51
|
-
puts "EasyPost Response Body: "
|
52
|
-
puts @response.body
|
53
|
-
puts "End of Body"
|
54
48
|
return EasyPost.symbolize_keys_recursive(JSON.parse(@response.body))
|
55
49
|
end
|
56
50
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easypost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|
@@ -54,7 +54,7 @@ files:
|
|
54
54
|
- lib/easypost/postage.rb
|
55
55
|
- lib/easypost/errors/easypost_error.rb
|
56
56
|
- lib/easypost/errors/authentication_error.rb
|
57
|
-
homepage: https://www.
|
57
|
+
homepage: https://www.geteasypost.com/docs
|
58
58
|
licenses: []
|
59
59
|
post_install_message:
|
60
60
|
rdoc_options: []
|