tweet_counts_recent: Count tweets

View source: R/tweet_counts.R

tweet_counts_recentR Documentation

Count tweets

Description

Count tweets

Usage

tweet_counts_recent(query, ..., token = NULL, parse = TRUE, verbose = FALSE)

tweet_counts_all(query, ..., token = NULL, parse = TRUE, verbose = FALSE)

Arguments

query

One query for matching Tweets.

...

Other arguments passed to the API.

token

These endpoints only accept a bearer token (can be created via rtweet_app()). In most cases you are better of changing the default for all calls via auth_as().

parse

If TRUE, the default, returns a tidy data frame. Use FALSE to return the "raw" list corresponding to the JSON returned from the Twitter API.

verbose

A logical value to provide more information about the paginated queries (if any) and to store the data of each page.

Value

The number of tweets for a given granularity

References

https://developer.twitter.com/en/docs/twitter-api/tweets/counts/api-reference/get-tweets-counts-all

https://developer.twitter.com/en/docs/twitter-api/tweets/counts/api-reference/get-tweets-counts-recent

Examples

if (FALSE) {
  tcr <- tweet_counts_recent(query = "#rtweet", parse = FALSE)
  tca <- tweet_counts_all(query = "#rtweet", parse = FALSE)
}

rtweet documentation built on May 29, 2024, 7:47 a.m.