Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kimromi/jp_zip_code
🏣 Convert from zip-code to japan address (included Roman address)
https://github.com/kimromi/jp_zip_code
japan-address roman-address ruby rubygems
Last synced: about 1 month ago
JSON representation
🏣 Convert from zip-code to japan address (included Roman address)
- Host: GitHub
- URL: https://github.com/kimromi/jp_zip_code
- Owner: kimromi
- License: mit
- Created: 2016-04-07T10:44:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-29T02:00:27.000Z (over 5 years ago)
- Last Synced: 2024-11-10T18:54:08.473Z (about 1 month ago)
- Topics: japan-address, roman-address, ruby, rubygems
- Language: Ruby
- Homepage:
- Size: 6.51 MB
- Stars: 10
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# JpZipCode
[![Gem Version](https://badge.fury.io/rb/jp_zip_code.svg)](https://badge.fury.io/rb/jp_zip_code)
[![Build Status](https://travis-ci.org/kimromi/jp_zip_code.svg?branch=master)](https://travis-ci.org/kimromi/jp_zip_code)
[![Test Coverage](https://codeclimate.com/github/kimromi/jp_zip_code/badges/coverage.svg)](https://codeclimate.com/github/kimromi/jp_zip_code/coverage)
[![Code Climate](https://codeclimate.com/github/kimromi/jp_zip_code/badges/gpa.svg)](https://codeclimate.com/github/kimromi/jp_zip_code)convert from zip-code to japan address (include Roman address)
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'jp_zip_code'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install jp_zip_code
## Usage
```
address = JpZipCode.search '100-0001'address['pref_code'] # => '13'
address['pref_kanji'] # => '東京都'
address['city_kanji'] # => '千代田区'
address['town_kanji'] # => '千代田'
address['pref_kana'] # => 'トウキョウト'
address['city_kana'] # => 'チヨダク'
address['town_kana'] # => 'チヨダ'
address['pref_roman'] # => 'Tokyo-To'
address['city_roman'] # => 'Chiyoda-Ku'
address['town_roman'] # => 'Chiyoda'
address['zip_code'] # => '1000001'JpZipCode.update # update json file
```## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).