Skip to contents

Choose which fields are used, by default all are returned. Usually all the first 3 are accepted together and the last two too.

Usage

set_fields(
  media = media_fields,
  poll = poll_fields,
  tweet = tweet_fields,
  place = place_fields,
  user = user_fields,
  list = list_fields
)

Arguments

media

The fields you want from media_fields.

poll

The fields you want from poll_fields.

tweet

The fields you want from tweet_fields.

place

The fields you want from place_fields.

user

The fields you want from user_fields.

list

The fields you want from list_fields.

Value

A list with the fields requested ready to be used in your requests to the API.

See also

Fields

Examples

set_fields()
#> $media.fields
#>  [1] "duration_ms"        "height"             "media_key"         
#>  [4] "preview_image_url"  "type"               "url"               
#>  [7] "width"              "public_metrics"     "non_public_metrics"
#> [10] "organic_metrics"    "promoted_metrics"   "alt_text"          
#> [13] "variants"          
#> 
#> $place.fields
#> [1] "contained_within" "country"          "country_code"     "full_name"       
#> [5] "geo"              "id"               "name"             "place_type"      
#> 
#> $poll.fields
#> [1] "duration_minutes" "end_datetime"     "id"               "options"         
#> [5] "voting_status"   
#> 
#> $tweet.fields
#>  [1] "attachments"         "author_id"           "context_annotations"
#>  [4] "conversation_id"     "created_at"          "entities"           
#>  [7] "edit_controls"       "geo"                 "id"                 
#> [10] "in_reply_to_user_id" "lang"                "public_metrics"     
#> [13] "possibly_sensitive"  "referenced_tweets"   "reply_settings"     
#> [16] "source"              "text"                "withheld"           
#> 
#> $user.fields
#>  [1] "created_at"        "description"       "entities"         
#>  [4] "id"                "location"          "verified_type"    
#>  [7] "name"              "pinned_tweet_id"   "profile_image_url"
#> [10] "protected"         "public_metrics"    "url"              
#> [13] "username"          "verified"          "withheld"         
#> 
#> $list.fields
#> [1] "created_at"     "follower_count" "member_count"   "private"       
#> [5] "description"    "owner_id"      
#> 
set_fields(media = NULL)
#> $place.fields
#> [1] "contained_within" "country"          "country_code"     "full_name"       
#> [5] "geo"              "id"               "name"             "place_type"      
#> 
#> $poll.fields
#> [1] "duration_minutes" "end_datetime"     "id"               "options"         
#> [5] "voting_status"   
#> 
#> $tweet.fields
#>  [1] "attachments"         "author_id"           "context_annotations"
#>  [4] "conversation_id"     "created_at"          "entities"           
#>  [7] "edit_controls"       "geo"                 "id"                 
#> [10] "in_reply_to_user_id" "lang"                "public_metrics"     
#> [13] "possibly_sensitive"  "referenced_tweets"   "reply_settings"     
#> [16] "source"              "text"                "withheld"           
#> 
#> $user.fields
#>  [1] "created_at"        "description"       "entities"         
#>  [4] "id"                "location"          "verified_type"    
#>  [7] "name"              "pinned_tweet_id"   "profile_image_url"
#> [10] "protected"         "public_metrics"    "url"              
#> [13] "username"          "verified"          "withheld"         
#> 
#> $list.fields
#> [1] "created_at"     "follower_count" "member_count"   "private"       
#> [5] "description"    "owner_id"      
#> 
set_fields(place = NULL, user = NULL)
#> $media.fields
#>  [1] "duration_ms"        "height"             "media_key"         
#>  [4] "preview_image_url"  "type"               "url"               
#>  [7] "width"              "public_metrics"     "non_public_metrics"
#> [10] "organic_metrics"    "promoted_metrics"   "alt_text"          
#> [13] "variants"          
#> 
#> $poll.fields
#> [1] "duration_minutes" "end_datetime"     "id"               "options"         
#> [5] "voting_status"   
#> 
#> $tweet.fields
#>  [1] "attachments"         "author_id"           "context_annotations"
#>  [4] "conversation_id"     "created_at"          "entities"           
#>  [7] "edit_controls"       "geo"                 "id"                 
#> [10] "in_reply_to_user_id" "lang"                "public_metrics"     
#> [13] "possibly_sensitive"  "referenced_tweets"   "reply_settings"     
#> [16] "source"              "text"                "withheld"           
#> 
#> $list.fields
#> [1] "created_at"     "follower_count" "member_count"   "private"       
#> [5] "description"    "owner_id"      
#>