diff --git a/R/search_tweets.R b/R/search_tweets.R index f5ae45d3..561183f0 100644 --- a/R/search_tweets.R +++ b/R/search_tweets.R @@ -21,6 +21,20 @@ #' e.g., \code{q = '"data science"'} or escape each internal double #' quote with a single backslash, e.g., \code{q = #' "\"data science\""}. +#' +#' Some other useful query tips: +#' +#' \itemize{ +#' \item Exclude retweets via \code{"-filter:retweets"} +#' \item Exclude quotes via \code{"-filter:quote"} +#' \item Exclude replies via \code{"-filter:replies"} +#' \item Filter (return only) verified via \code{"filter:verified"} +#' \item Exclude verified via \code{"-filter:verified"} +#' \item Get everything (firehose for free) via \code{"-filter:verified OR filter:verified"} +#' \item Filter (return only) tweets with links to news articles via \code{"filter:news"} +#' \item Filter (return only) tweets with media \code{"filter:media"} +#' } +#' #' @param n Integer, specifying the total number of desired tweets to #' return. Defaults to 100. Maximum number of tweets returned from a #' single token is 18,000. To return more than 18,000 tweets, users diff --git a/R/timeline.R b/R/timeline.R index f0410b30..ea3e1c5a 100644 --- a/R/timeline.R +++ b/R/timeline.R @@ -5,7 +5,9 @@ #' #' @param user Vector of user names, user IDs, or a mixture of both. #' @param n Number of tweets to return per timeline. Defaults to 100. -#' Must be of length 1 or equal to length of user. +#' Must be of length 1 or equal to length of user. This number should +#' not exceed 3200 as Twitter limits returns to the most recent 3,200 +#' statuses posted or retweeted by each user. #' @param max_id Character, returns results with an ID less than (that is, #' older than) or equal to `max_id`. #' @param home Logical, indicating whether to return a user-timeline diff --git a/man/get_timeline.Rd b/man/get_timeline.Rd index 3dad42ad..8a49b3b6 100644 --- a/man/get_timeline.Rd +++ b/man/get_timeline.Rd @@ -15,7 +15,9 @@ get_timelines(user, n = 100, max_id = NULL, home = FALSE, \item{user}{Vector of user names, user IDs, or a mixture of both.} \item{n}{Number of tweets to return per timeline. Defaults to 100. -Must be of length 1 or equal to length of user.} +Must be of length 1 or equal to length of user. This number should +not exceed 3200 as Twitter limits returns to the most recent 3,200 +statuses posted or retweeted by each user.} \item{max_id}{Character, returns results with an ID less than (that is, older than) or equal to `max_id`.} diff --git a/man/search_tweets.Rd b/man/search_tweets.Rd index 8fe09575..cc382027 100644 --- a/man/search_tweets.Rd +++ b/man/search_tweets.Rd @@ -13,21 +13,34 @@ search_tweets2(...) } \arguments{ \item{q}{Query to be searched, used to filter and select tweets to -return from Twitter's REST API. Must be a character string not to -exceed maximum of 500 characters. Spaces behave like boolean -"AND" operator. To search for tweets containing at least one of -multiple possible terms, separate each search term with spaces -and "OR" (in caps). For example, the search \code{q = -"data science"} looks for tweets containing both "data" and -"science" anywhere located anywhere in the tweets and in any -order. When "OR" is entered between search terms, \code{query = -"data OR science"}, Twitter's REST API should return any tweet -that contains either "data" or "science." It is also possible to -search for exact phrases using double quotes. To do this, either -wrap single quotes around a search query using double quotes, -e.g., \code{q = '"data science"'} or escape each internal double -quote with a single backslash, e.g., \code{q = -"\"data science\""}.} + return from Twitter's REST API. Must be a character string not to + exceed maximum of 500 characters. Spaces behave like boolean + "AND" operator. To search for tweets containing at least one of + multiple possible terms, separate each search term with spaces + and "OR" (in caps). For example, the search \code{q = + "data science"} looks for tweets containing both "data" and + "science" anywhere located anywhere in the tweets and in any + order. When "OR" is entered between search terms, \code{query = + "data OR science"}, Twitter's REST API should return any tweet + that contains either "data" or "science." It is also possible to + search for exact phrases using double quotes. To do this, either + wrap single quotes around a search query using double quotes, + e.g., \code{q = '"data science"'} or escape each internal double + quote with a single backslash, e.g., \code{q = + "\"data science\""}. + +Some other useful query tips: + +\itemize{ + \item Exclude retweets via \code{"-filter:retweets"} + \item Exclude quotes via \code{"-filter:quote"} + \item Exclude replies via \code{"-filter:replies"} + \item Filter (return only) verified via \code{"filter:verified"} + \item Exclude verified via \code{"-filter:verified"} + \item Get everything (firehose for free) via \code{"-filter:verified OR filter:verified"} + \item Filter (return only) tweets with links to news articles via \code{"filter:news"} + \item Filter (return only) tweets with media \code{"filter:media"} +}} \item{n}{Integer, specifying the total number of desired tweets to return. Defaults to 100. Maximum number of tweets returned from a