aupost 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 770d1665f9531d9fad7030d50e12aca5dbbfbbc9
4
- data.tar.gz: e8e8ff3f2bd99c0ce16ee977cd6ded5564bd8c20
3
+ metadata.gz: 5b1ef091fc8e8fc107d19409cf3a7f3992ed1893
4
+ data.tar.gz: 2dc5135d7e9bc5b26e173520bc6ae44351f41ae7
5
5
  SHA512:
6
- metadata.gz: 6cc0a6d31d6a5c45a172e02d4f5b141ba50ba4d2f7e1aa04054665ecbb8b363874197fa4f9d4239930d355f7954346a157debec8402fe3224bbcf7d59c42b9f7
7
- data.tar.gz: 32fbc7dac39e889cdbe260d4ff41bbb320010349780ab439f99dc773b34e2c500709857c59ec3012b3b587c8ee0ab62e9b082e5aa9abe49a52004454788ee4c5
6
+ metadata.gz: 478371189884256eca849d98985041a2defc4b66dd35fc145afdc226dca28f21121bf66aa2ae99465a6b18c18d43fde6feba5804805213a8e293658df1a60884
7
+ data.tar.gz: 1c693c6c0d4863ac43ae8005fe2244f83f476252cda28f45b977edb9fe30e90d41145aaac94c66a480f0b6fe82ed81381c625104863b7454d270f742c40fcfb1
data/README.md CHANGED
@@ -22,7 +22,9 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ $ client = Aupost::Client.new("YOUR AUPOST KEY HERE")
26
+
27
+ $ client.domestic_postcode_search("can")
26
28
 
27
29
  ## Development
28
30
 
Binary file
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Aupost
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  AUPOST_URL = "https://auspost.com.au/api"
4
4
 
5
5
  end
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.0
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