aupost 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/aupost-0.1.0.gem +0 -0
- data/lib/aupost.rb +9 -0
- data/lib/aupost/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b1ef091fc8e8fc107d19409cf3a7f3992ed1893
|
4
|
+
data.tar.gz: 2dc5135d7e9bc5b26e173520bc6ae44351f41ae7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 478371189884256eca849d98985041a2defc4b66dd35fc145afdc226dca28f21121bf66aa2ae99465a6b18c18d43fde6feba5804805213a8e293658df1a60884
|
7
|
+
data.tar.gz: 1c693c6c0d4863ac43ae8005fe2244f83f476252cda28f45b977edb9fe30e90d41145aaac94c66a480f0b6fe82ed81381c625104863b7454d270f742c40fcfb1
|
data/README.md
CHANGED
data/aupost-0.1.0.gem
ADDED
Binary file
|
data/lib/aupost.rb
CHANGED
@@ -21,5 +21,14 @@ module Aupost
|
|
21
21
|
|
22
22
|
end
|
23
23
|
|
24
|
+
def country(format = "json")
|
25
|
+
uri = URI("#{Aupost::AUPOST_URL}/postage/country.#{format}")
|
26
|
+
req = Net::HTTP::Get.new(uri)
|
27
|
+
req['AUTH-KEY'] = @aupost_key
|
28
|
+
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
|
29
|
+
return http.request(req).read_body
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
24
33
|
end
|
25
34
|
end
|
data/lib/aupost/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aupost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyson Cung
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- LICENSE.txt
|
54
54
|
- README.md
|
55
55
|
- Rakefile
|
56
|
+
- aupost-0.1.0.gem
|
56
57
|
- aupost.gemspec
|
57
58
|
- bin/console
|
58
59
|
- bin/setup
|