Last data update: 2014.03.03

R: Return a url to get qurey result from Youdao.
youdaoUrlR Documentation

Return a url to get qurey result from Youdao.

Description

Youdao open API key and keyfrom should be provided.

Usage

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(RYoudaoTranslate)
Loading required package: RCurl
Loading required package: bitops
Loading required package: rjson
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RYoudaoTranslate/youdaoUrl.Rd_%03d_medium.png", width=480, height=480)
> ### Name: youdaoUrl
> ### Title: Return a url to get qurey result from Youdao.
> ### Aliases: youdaoUrl
> ### Keywords: Youdao
> 
> ### ** Examples
> 
> 	apikey = "498375134"
> 	keyfrom = "JustForTestYouDao"
> 	Url = youdaoUrl(word="youdao",api=apikey,keyfrom=keyfrom)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>