Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
Update vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
llrs committed Oct 13, 2023
1 parent 2bb404d commit d2aba5f
Show file tree
Hide file tree
Showing 11 changed files with 298 additions and 607 deletions.
89 changes: 13 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,8 @@ install.packages("rtweet", repos = 'https://ropensci.r-universe.dev')

## Usage

All users must be authenticated to interact with Twitters APIs. The
easiest way to authenticate is to use your personal twitter account -
this will happen automatically (via a browser popup) the first time you
use an rtweet function. See `auth_setup_default()` for details. Using
your personal account is fine for casual use, but if you are trying to
collect a lot of data its a good idea to authentication with your own
Twitterapp. See `vignette("auth", package = "rtweet")` for details.
All users must be authenticated to interact with Twitters APIs. See
`vignette("auth", package = "rtweet")` for details.

``` r
library(rtweet)
Expand All @@ -49,80 +44,22 @@ library(rtweet)
rtweet should be used in strict accordance with Twitters [developer
terms](https://developer.twitter.com/en/developer-terms/more-on-restricted-use-cases).

### Search tweets or users

Search for up to 1000 tweets containing \#rstats, the common hashtag
used to refer to the R language, excluding retweets:

``` r
rt <- search_tweets("#rstats", n = 1000, include_rts = FALSE)
```

Twitter rate limits cap the number of search results returned to 18,000
every 15 minutes. To request more than that, set
`retryonratelimit = TRUE` and rtweet will wait for rate limit resets for
you.

Search for 200 users with the \#rstats in their profile:

``` r
useRs <- search_users("#rstats", n = 200)
```

### Stream tweets

Randomly sample (approximately 1%) from the live stream of all tweets:

``` r
random_stream <- stream_tweets("")
```

Stream all geo-located tweets from London for 60 seconds:

``` r
stream_london <- stream_tweets(location = lookup_coords("london"), timeout = 60)
```

### Get friends and followers

Get all accounts followed by a user:

``` r
## get user IDs of accounts followed by R Foundation
R_Foundation_fds <- get_friends("_R_Foundation")

## lookup data on those accounts
R_Foundation_fds_data <- lookup_users(R_Foundation_fds$to_id)
```

Get all accounts following a user:

``` r
## get user IDs of accounts following R Foundation
R_Foundation_flw <- get_followers("_R_Foundation", n = 100)
R_Foundation_flw_data <- lookup_users(R_Foundation_flw$from_id)
```

If you want *all* followers, youll need youll need to set `n = Inf`
and `retryonratelimit = TRUE` but be warned that this might take a
*long* time.

### Get timelines
## Usage

Get the most recent 100 tweets from R Foundation:
Depending on if you are a paid user or not you can do more or less
things.

``` r
## get most recent 100 tweets from R Foundation
tmls <- get_timeline("_R_Foundation", n = 100)
```
# Free

### Get favorites
You can post (`tweet_post()`) and retrieve information about yourself
(`user_self()`).

Get the 10 most recently favorited statuses by R Foundation:
# Paid

``` r
favs <- get_favorites("_R_Foundation", n = 10)
```
You can do all the other things: search tweets
(`tweet_search_recent()`), retrieve your own bookmarks
(`user_bookmarks()`), check who follows who, (`user_following()`, or
`user_followers()`), ….

## Contact

Expand Down
79 changes: 43 additions & 36 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,67 @@
# Platform

|field |value |
|:--------|:----------------------------|
|version |R version 4.2.2 (2022-10-31) |
|os |Ubuntu 22.04.2 LTS |
|system |x86_64, linux-gnu |
|ui |X11 |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |Europe/Madrid |
|date |2023-03-16 |
|pandoc |2.9.2.1 @ /usr/bin/pandoc |
|field |value |
|:--------|:----------------------------------------------------------------------------|
|version |R version 4.3.1 (2023-06-16) |
|os |Ubuntu 22.04.3 LTS |
|system |x86_64, linux-gnu |
|ui |RStudio |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |Europe/Madrid |
|date |2023-10-13 |
|rstudio |2023.06.1+524 Mountain Hydrangea (desktop) |
|pandoc |3.1.1 @ /usr/lib/rstudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown) |

# Dependencies

|package |old |new |Δ |
|:-----------|:-----|:----------|:--|
|rtweet |1.1.0 |1.1.0.9009 |* |
|askpass |1.1 |1.1 | |
|rtweet |1.1.0 |1.2.0.9006 |* |
|askpass |1.2.0 |1.2.0 | |
|bit |4.0.5 |4.0.5 | |
|bit64 |4.0.5 |4.0.5 | |
|cli |3.6.0 |3.6.0 | |
|cli |3.6.1 |3.6.1 | |
|crayon |1.5.2 |1.5.2 | |
|curl |5.0.0 |5.0.0 | |
|ellipsis |0.3.2 |0.3.2 | |
|fansi |1.0.4 |1.0.4 | |
|curl |5.1.0 |5.1.0 | |
|fansi |1.0.5 |1.0.5 | |
|glue |1.6.2 |1.6.2 | |
|hms |1.1.2 |1.1.2 | |
|httr |1.4.5 |1.4.5 | |
|httr2 |0.2.2 |0.2.2 | |
|jsonlite |1.8.4 |1.8.4 | |
|hms |1.1.3 |1.1.3 | |
|httr |1.4.7 |1.4.7 | |
|httr2 |0.2.3 |0.2.3 | |
|jsonlite |1.8.7 |1.8.7 | |
|lifecycle |1.0.3 |1.0.3 | |
|magrittr |2.0.3 |2.0.3 | |
|mime |0.12 |0.12 | |
|openssl |2.0.6 |2.0.6 | |
|pillar |1.8.1 |1.8.1 | |
|openssl |2.1.1 |2.1.1 | |
|pillar |1.9.0 |1.9.0 | |
|pkgconfig |2.0.3 |2.0.3 | |
|prettyunits |1.1.1 |1.1.1 | |
|prettyunits |1.2.0 |1.2.0 | |
|progress |1.2.2 |1.2.2 | |
|R6 |2.5.1 |2.5.1 | |
|rappdirs |0.3.3 |0.3.3 | |
|rlang |1.1.0 |1.1.0 | |
|sys |3.4.1 |3.4.1 | |
|tibble |3.2.0 |3.2.0 | |
|rlang |1.1.1 |1.1.1 | |
|sys |3.4.2 |3.4.2 | |
|tibble |3.2.1 |3.2.1 | |
|utf8 |1.2.3 |1.2.3 | |
|vctrs |0.5.2 |0.5.2 | |
|withr |2.5.0 |2.5.0 | |
|vctrs |0.6.4 |0.6.4 | |
|withr |2.5.1 |2.5.1 | |

# Revdeps

## Failed to check (3)
## Failed to check (10)

|package |version |error |warning |note |
|:---------|:-------|:-----|:-------|:----|
|epitweetr |? | | | |
|saotd |? | | | |
|tidytags |? | | | |
|package |version |error |warning |note |
|:-----------|:-------|:-----|:-------|:----|
|bdpar |? | | | |
|carbonate |? | | | |
|epitweetr |? | | | |
|graphTweets |? | | | |
|imgrec |? | | | |
|saotd |? | | | |
|tidytags |? | | | |
|Twitmo |? | | | |
|VOSONDash |? | | | |
|vosonSML |? | | | |

2 changes: 1 addition & 1 deletion revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## revdepcheck results

We checked 13 reverse dependencies (10 from CRAN + 3 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
We checked 13 reverse dependencies (3 from CRAN + 10 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
Expand Down
Loading

0 comments on commit d2aba5f

Please sign in to comment.