R/common.get_country.R

##' Return countries list.
##' 
##' @title Return countries list.
##' @param roauth A OAuth object created by \code{\link{createOAuth}}.
##' @param capital The first letter of the provinces, a-z. Return all of the provinces 
##'        if the parameter is not provided.Default is not provided.
##' @param language The returned language version. zh-cn: Simplified Chinese; 
##'        zh-tw: Traditional Chinese; english: English; Default is zh-cn.
##' @return 
##'  A list of countries.
##'  
##' @author Jian Li <\email{rweibo@@sina.com}>
##' @references \url{http://open.weibo.com/wiki/2/common/get_country}
##' @keywords Accounts
##' @examples \dontrun{
##' 
##' common.get_country(roauth)
##' }

common.get_country <- function(roauth, capital, language) {
	requestURL <- "https://api.weibo.com/2/common/get_country.json"
	funCall <- match.call()
	params <- as.list(funCall)
	params[[1]] <- NULL
	params[["roauth"]] <- NULL

	returnthis <- .get(requestURL, roauth$oauthToken, params=params)
	return(returnthis)
}

Try the Rweibo package in your browser

Any scripts or data that you put into this service are public.

Rweibo documentation built on May 2, 2019, 5:23 p.m.