ATNDã«ç»é²ããã¦ããtwitterIDãããããã£ã¼ã«ãåå¾ãã
åå¼·ä¼ã«ã©ããªäººãæ¥ã¦ãããç¥ãããå ´åç»é²ããã¦ããtwitterIDãããããã£ã¼ã«ã調ã¹ãã®ãæã£ã¨ãæ©ããä¸ä»¶ä¸ä»¶èª¿ã¹ãã®ã¯ããã©ããããããã¾ã§ä¿ºã¯ä»äººã«èå³ããªããå¾ã£ã¦ä¸è¦§ã§ããããã®ãã²ããã§ããã¨å¬ããã®ã§Rã§æ¸ããã
getATNDprof <- function(eventid){ require(RCurl) require(rjson) resATND <- fromJSON(getURL(sprintf("http://api.atnd.org/events/users/?event_id=%s&format=json", eventid))) ids <- unlist(lapply(resATND$events[[1]]$users, function(x)x$twitter_id)) res <- NULL for(id in ids){ url <- sprintf("http://api.twitter.com/1/users/show.json?screen_name=%s", id) res0 <- data.frame(twitter_id = id, prof = fromJSON(getURL(url))$description, stringsAsFactors = FALSE) res <- rbind(res, res0) } return(res) }
åå¼·ä¼ã®éå¶ã¨ãèããã°google scriptã§æ¸ãã¦google documentã«ã¢ããããATNDã®äºåã¢ã³ã±ã¼ãçµæï¼æ親ä¼åºæ¬ ã¨ãï¼ã¨ç´ã¥ããã¨ä¾¿å©ãªã®ã ããªããã¨ã©ã¼ãåºã¦ãã¾ããããªãã®ã§ã¾ãå¾æ¥ã