1

Using "rtweet" rPackage. Is there a way to get the response status of a query while fetching tweets from the twitter API?

Something similar to the following :

library(httr)
github_api <- function(path) {
  url <- modify_url("https://api.github.com", path = path)
  GET(url)
}

resp <- github_api("/repos/hadley/httr")
resp
#> Response [https://api.github.com/repositories/2756403]
#>   Date: 2019-07-30 13:44
#>   **Status: 200**
#>   Content-Type: application/json; charset=utf-8
#>   Size: 6.04 kB
#> {
#>   "id": 2756403,
#>   "node_id": "MDEwOlJlcG9zaXRvcnkyNzU2NDAz",
#>   "name": "httr",
#>   "full_name": "r-lib/httr",
#>   "private": false,
#>   "owner": {
#>     "login": "r-lib",
#>     "id": 22618716,
#>     "node_id": "MDEyOk9yZ2FuaXphdGlvbjIyNjE4NzE2",
#> ...
Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
SomeGuy123
  • 11
  • 3
  • Tanay, on SO it helps considerably if you provide sample code showing effort and intent (mostly effort, to be honest). If you can show a small (and reproducible) working example, I think you'd be more likely to get a relevant answer. – r2evans Aug 15 '19 at 03:02

0 Answers0