nextTweetFetcher: Looping after first tweet fetching

Description Usage Arguments Value Examples

View source: R/nextTweetLooper.R

Description

This function should be used at the start of each session

Usage

1
nextTweetFetcher(nextInfo = NULL, nextParams = NULL, q = NULL)

Arguments

nextInfo

sending from tweetFetcher function with final form

nextParams

required after the first tweet fetch process

q

is quantity, so its looping pagination limit

Value

String

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
headers <- c(`Authorization` = sprintf('Bearer %s', "YOUR BEARER TOKEN"))
params <- list(`query` = paste("Your-query", "lang:en"),`max_results` = 100,
`tweet.fields` = 'created_at,lang,conversation_id',`page` = 1)
nextInfo <- list("headers" = headers,"params" = params, url = "url")
nextParams <- list(`query` = nextInfo$params$query,
`next_token` = "After fetching take a token for next tweet fetch")
## Not run: 
nextTweetFetcher(nextInfo,nextParams,q = nextInfo$params$page)

## End(Not run)

tsentiment documentation built on July 19, 2021, 9:06 a.m.