testing API
This commit is contained in:
@@ -36,6 +36,16 @@ params <- c(
|
|||||||
);
|
);
|
||||||
|
|
||||||
url <- "https://api.twitter.com/1.1/statuses/user_timeline.json";
|
url <- "https://api.twitter.com/1.1/statuses/user_timeline.json";
|
||||||
query <- c(screen_name="peteraltmaier", exclude_replies="true", include_rts=1, count="1");
|
query <- c(screen_name="peteraltmaier", include_rts=1, count="100", exclude_replies="true", trim_user="true", include_entities="false");
|
||||||
|
|
||||||
|
result <- twitter_api_call(url, query, params)
|
||||||
|
|
||||||
|
# Replace characters messing up JSON validation (\ and \n)
|
||||||
|
result <- str_replace(string = result, pattern = perl('\\\\(?![tn"])'), replacement = " ")
|
||||||
|
result <- str_replace(string = result, pattern = "\n", replacement = " ")
|
||||||
|
|
||||||
|
result <- fromJSON(result)
|
||||||
|
|
||||||
|
# ---------------
|
||||||
|
|
||||||
|
|
||||||
result <- fromJSON(twitter_api_call(url, query, params))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user