Skip to content

Instantly share code, notes, and snippets.

@baxang
Created March 15, 2013 06:52
Show Gist options
  • Save baxang/5167948 to your computer and use it in GitHub Desktop.
Save baxang/5167948 to your computer and use it in GitHub Desktop.
require 'nokogiri'
require 'addressable/uri'
api_key = 'your_key'
uri = Addressable::URI.parse 'http://openapi.epost.go.kr/postal/retrieveLotNumberAdressService/retrieveLotNumberAdressService/getComplexList'
uri.query_values = {
ServiceKey: api_key,
srchwrd: '무악동',
areaNm: '현대아파트',
searchSe: 'and'
}
response = `curl #{uri}`
doc = Nokogiri::XML( open(uri) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment