if (FALSE) {
# stream public timeline for 30 seconds
stream_timeline_public(timeout = 30, file_name = "public.json")
# stream timeline of mastodon.social for 30 seconds
stream_timeline_public(
timeout = 30, local = TRUE,
instance = "mastodon.social", file_name = "social.json"
)
# stream hashtag timeline for 30 seconds
stream_timeline_hashtag("rstats", timeout = 30, file_name = "rstats_public.json")
# stream hashtag timeline of mastodon.social for 30 seconds
stream_timeline_hashtag("rstats",
timeout = 30, local = TRUE,
instance = "fosstodon.org", file_name = "rstats_foss.json"
)
# json files can be parsed with parse_stream()
parse_stream("rstats_foss.json")
}
Run the code above in your browser using DataLab