Socket
Socket
Sign inDemoInstall

github.com/suapapa/go_postkr

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/suapapa/go_postkr

Package postkr provides access to APIs of epost.kr, Korean post office. The epost.kr provide APIs for track snail-mail and search zip-code. But, I can't access to the tracking API with my key. So, It's not implemented currently. You need own key which is issued by eport.kr. Get one from this link:


Version published

Readme

Source

About postkr

인터넷 우체국 오픈API를 위한 Go언어 패키지 입니다.

현재, 우편번호, 종추적조회, EMS 중 우편번호 기능 만 구현되어 있습니다.

Documentation

Prerequisites

Install Go

Installation

$ go get github.com/suapapa/go_postkr

General Documentation

godoc.org 링크에서 온라인 문서를 보거나, 다음 명령으로 로컬에서 문서를 볼 수 있습니다.

go doc github.com/suapapa/go_postkr

Example

postkr을 사용하려면, 인터넷 우체국의 오픈API사용신청을 통해 키를 발급 받아야 합니다. 발급받은 키를 아래 코드의 yourKey 변수에 할당하세요.

package main

import (
        "fmt"
        "github.com/suapapa/go_postkr"
)

func main() {
        // 발급받은 오픈API 키로 바꾸세요
        yourKey := "abcedfghijklmnopqrstuvwxyz1234"

        s := postkr.NewService(yourKey)
        l, err := s.SerchZipCode("내곡동")
        if err != nil {
                fmt.Println(err)
                return
        }

        for _, p := range l {
                fmt.Printf("(%s) %s\n", p.Code, p.Address)
        }
}

실행 결과

$ go run postkr.go
(137180) 서울 서초구 내곡동
(412260) 경기 고양시 덕양구 내곡동
(210160) 강원 강릉시 내곡동
(210701) 강원 강릉시 내곡동 관동대
...

Author

Homin Lee <homin.lee@suapapa.net>

Copyright (c) 2012, Homin Lee. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

FAQs

Last updated on 06 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc