suggested_users: Get user [account] suggestions for authenticating user

Description Usage Arguments Details Value Examples

View source: R/suggested.R

Description

Returns Twitter's list of suggested user categories.

Returns users data for all users in Twitter's suggested categories.

Usage

1
2
3
4
5
suggested_slugs(lang = NULL, token = NULL)

suggested_users(slug, lang = NULL, parse = TRUE, token = NULL)

suggested_users_all(slugs = NULL, parse = TRUE, token = NULL)

Arguments

lang

optional Restricts the suggested categories to the requested language. The language must be specified by the appropriate two letter ISO 639-1 representation.

token

a twitter token.

slug

required The short name of list or a category

parse

Logical indicating whether to parse the returned data into a data frame. See details for more on the returned users data.

slugs

Optional, one or more slugs returned by suggested_slugs. API rate limits this to 15 max (function will return warnings for slugs provided beyond the remaining limit).

Details

Currently, this parsing process drops all recursive (list) columns, which mostly means you are shorted some entities data. To maximize users data, however, it is recommended to make an additional lookup_users call using the user IDs returned by this function.

Value

List of recommended categories which can be passed along as the "slug" parameter in suggested_users

Recommended users

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 

## get slugs
slugs <- suggested_slugs()

## use slugs to get suggested users
suggested_users(slugs$slug[1])

## alternatively, get all users from all slugs in one function
sugs <- all_suggested_users()

## print data
sugs

## for complete users data, lookup user IDs
sugs_usr <- lookup_users(sugs$user_id)

## view users data
sugs_usr


## End(Not run)

mkearney/rtw documentation built on Dec. 21, 2021, 7:05 p.m.