Documentation
¶
Index ¶
Constants ¶
View Source
const ( SUCCESS_CODE = "200" ERROR_CODE = "-1" )
View Source
const (
API_URL = "http://www.tuling123.com/openapi/api"
)
Variables ¶
This section is empty.
Functions ¶
func QueryByMoli ¶
func QueryFromYoudaoAsString ¶
func SetBaiduKey ¶
func SetBaiduKey(key string)
func SetGaodekey ¶
func SetGaodekey(key ...string)
Types ¶
type GeoLocation ¶
type GeoLocation struct { Lat string //纬度 `json:"lat,float32"` Lng string //经度 `json:"lng,float32"` }
func (*GeoLocation) UnmarshalJSON ¶
func (this *GeoLocation) UnmarshalJSON(data []byte) error
type LocationQueryResponse ¶
type LocationQueryResponse struct { Status string `json:"status"` Message string `json:"message"` Result []locationResult `json:"result"` }
func QueryLocationTips ¶
func QueryLocationTips(city, citycode, input string) *LocationQueryResponse
type TulingItem ¶
type TulingRequest ¶
type TulingRespone ¶
type TulingRespone struct { Code int64 `json:"code"` Text string `json:"text"` URL string `json:"url"` List []TulingItem `json:"list"` }
*
100000 文本类 200000 链接类 有url 302000 新闻类 有list 308000 菜谱类
type TulingSDK ¶
type TulingSDK struct {
Key string
}
func (*TulingSDK) Query ¶
func (this *TulingSDK) Query(user, text string) TulingRespone
func (*TulingSDK) QueryAsString ¶
type YoudaoResponse ¶
type YoudaoResponse struct { Translation []string `json:"translation"` //翻译内容 Basic basicDict `json:"basic"` //基础词典 Query string `json:"query"` //查询的词 Code int `json:"errorCode"` //错误码 0 -代表成功 WebItems []webItem `json:"web"` //网络词条 }
func QueryFromYoudao ¶
func QueryFromYoudao(msg string) *YoudaoResponse
Click to show internal directories.
Click to hide internal directories.