dict

package
v0.0.0-...-6464992 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	YoudaoBaseURL = "http://fanyi.youdao.com/"
)

Functions

func Register

func Register()

Types

type Client

type Client struct {
	BaseURL string
	Keyfrom string
	Key     string
}

func NewClient

func NewClient() *Client

func (*Client) Query

func (c *Client) Query(q string) (*Result, error)

func (*Client) QueryHttp

func (c *Client) QueryHttp(httpClient *http.Client, q string) (*Result, error)

type Result

type Result struct {
	ErrorCode   int      `json:"errorCode"`
	Query       string   `json:"query"`
	Translation []string `json:"translation"`
	Basic       *struct {
		Phonetic string   `json:"phonetic"`
		Explains []string `json:"explains"`
	} `json:"basic"`
	Web []struct {
		Key   string   `json:"key"`
		Value []string `json:"value"`
	} `json:"web"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL