mojikiban-go

mojikiban-go is a client library for the Mojikiban API.

Install

$ go get github.com/yassun/mojikiban-go

Usage

Search

r := []rune("字")
o := SearchOptions{
  UCS: fmt.Sprintf("0x%x", r[0]), // "0x8fbb"
}
client := NewClient()
res, _ := client.Search(context.Background(), o)

// &{Status:success Find:true Results:[{MJMojizukeimei:MJ010057 ..... ] Count:1}
fmt.Printf("%+v\n", res)

Info

o := GetOptions{
  MJMojizukeimei: "MJ010057",
}
client := NewClient()
res, _ := client.Get(context.Background(), o)

// &{Version:005.02 Date:2018-01-26 MJCharInfo:[{MJMojizukeimei:MJ010057,...}]
fmt.Printf("%+v\n", res)