youdaoUrl: Return a url to get qurey result from Youdao.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Youdao.R

Description

Youdao open API key and keyfrom should be provided.

Usage

1
youdaoUrl(word, api, keyfrom)

Arguments

word

The word you want to look up.

api

A Youdao API key. You can get it from http://fanyi.youdao.com/openapi.

keyfrom

A Youdao keyfrom. You can get it from http://fanyi.youdao.com/openapi.

Details

All of three arguments are needed. The API key and keyfrom could be get from http://fanyi.youdao.com/openapi?path=data-mode. If the vocabulary is consist of two words, the space between two words will be converted to a "+".

Value

Return a url link.

Author(s)

Ke-Hao Wu

References

http://fanyi.youdao.com/openapi?path=data-mode http://www.youdao.com/help/fanyiapi/privacy/

Examples

1
2
3
	apikey = "498375134"
	keyfrom = "JustForTestYouDao"
	Url = youdaoUrl(word="youdao",api=apikey,keyfrom=keyfrom)

Example output

Loading required package: RCurl
Loading required package: bitops
Loading required package: rjson

RYoudaoTranslate documentation built on May 29, 2017, 11:30 a.m.