Description Usage Arguments Details Value Author(s) References Examples
This function return a result from youdao translation using url privided by youdaoUrl function.
1 | youdaoTranslate(word, api, keyfrom)
|
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. |
All of three arguments are needed. This function will call youdaoUrl using getURL from RCurl package. The result is processed by fromJSON from rjson package.
A list will be returned.
Ke-Hao Wu
http://fanyi.youdao.com/openapi?path=data-mode http://www.youdao.com/help/fanyiapi/privacy/
1 2 3 4 5 6 | library(RCurl)
library(rjson)
apikey = "498375134"
keyfrom = "JustForTestYouDao"
word = "youdao"
Obj = youdaoTranslate(word,api=apikey,keyfrom=keyfrom)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.