| Title: | What the Package Does (One Line, Title Case) |
|---|---|
| Description: | What the package does (one paragraph). |
| Authors: | First Last [aut, cre] (ORCID: YOUR-ORCID-ID) |
| Maintainer: | First Last <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.0.9000 |
| Built: | 2026-05-08 06:00:27 UTC |
| Source: | https://github.com/favstats/untruthr |
Conditionally apply expressions on a data object
do_if_else(.data, condition, .if, .else = identity)do_if_else(.data, condition, .if, .else = identity)
.data |
Input data |
condition |
A logical value to determine whether to use .if or .else |
.if |
Formula or function to apply to intput data when condition is TRUE |
.else |
Formula or function to apply to intput data when condition is FALSE |
Output of appropriate .if/.else call
This function authenticates with Truth Social using the provided client ID, client secret, username, and password. If a valid authentication token is already stored in the truth_social_token environment variable, the function will ask if the user wants to refresh the token.
untruth_auth( CLIENT_ID = Sys.getenv("truth_social_client_id"), CLIENT_SECRET = Sys.getenv("truth_social_client_secret"), username = Sys.getenv("truth_social_user"), password = Sys.getenv("truth_social_pw") )untruth_auth( CLIENT_ID = Sys.getenv("truth_social_client_id"), CLIENT_SECRET = Sys.getenv("truth_social_client_secret"), username = Sys.getenv("truth_social_user"), password = Sys.getenv("truth_social_pw") )
CLIENT_ID |
The client ID provided by Truth Social. |
CLIENT_SECRET |
The client secret provided by Truth Social. |
username |
The username to use for authentication. |
password |
The password to use for authentication. |
A character string containing the authentication token.
This function allows you to look up a user by their handle.
untruth_lookup_users(user_handle, monitor = F, switch_token = NULL, ...)untruth_lookup_users(user_handle, monitor = F, switch_token = NULL, ...)
user_handle |
The user's handle. |
monitor |
Whether to monitor the rate limit. |
switch_token |
Whether to switch the token. |
... |
Additional parameters to pass to the |
A data frame containing information about the user.
untruth_lookup_users("realdonaldtrump")untruth_lookup_users("realdonaldtrump")
This function searches for content on Truth Social using the provided query string and search type. The number of results to return is determined by the limit argument, and the size of the results pages is determined by the size argument. If the switch_token argument is provided, the function will use a randomly selected token from the available tokens.
untruth_search( what_are_you_looking_for, search_type = "statuses", limit = 40, size = 80, verbose = T, retry_on_timeout = T, switch_token = NULL, monitor = F, ... )untruth_search( what_are_you_looking_for, search_type = "statuses", limit = 40, size = 80, verbose = T, retry_on_timeout = T, switch_token = NULL, monitor = F, ... )
what_are_you_looking_for |
A character string specifying the search query. |
search_type |
A character string specifying the type of content to search for. Valid values are "statuses" and "hashtags". |
limit |
An integer specifying the maximum number of results to return. |
size |
An integer specifying the size of the results pages to return. |
verbose |
A logical value indicating whether to print status messages to the console. |
retry_on_timeout |
A logical value indicating whether to retry the search if a timeout occurs. |
switch_token |
A logical value indicating whether to use a randomly selected token from the available tokens |
monitor |
A logical value indicating whether to monitor the rate limit status. |
... |
Additional arguments to pass to the httr::GET() function. |
A data frame containing the search results.
Get suggested users from Truth Social
untruth_suggested_users( maximum = 20, monitor = FALSE, switch_token = NULL, ... )untruth_suggested_users( maximum = 20, monitor = FALSE, switch_token = NULL, ... )
maximum |
Maximum number of suggestions to return |
monitor |
If |
switch_token |
If |
A data frame of suggested users
This function retrieves trending hashtags or truths from Truth Social. The type of content to retrieve is determined by the type argument. If the switch_token argument is provided, the function will use a randomly selected token from the available tokens.
untruth_trends(type = "hashtags", switch_token = NULL)untruth_trends(type = "hashtags", switch_token = NULL)
type |
A character string specifying the type of content to retrieve. Valid values are "hashtags" and "truths". |
switch_token |
A logical value indicating whether to use a randomly selected token from the available tokens |
A data frame containing the trending hashtags or truths, as well as a timestamp indicating when the data was retrieved.
Retrieve user statuses on Truth Social
untruth_user_statuses( user_handle = NULL, account_id = NULL, limit = 40, size = 120, verbose = T, retry_on_timeout = T, switch_token = NULL, monitor = F, ... )untruth_user_statuses( user_handle = NULL, account_id = NULL, limit = 40, size = 120, verbose = T, retry_on_timeout = T, switch_token = NULL, monitor = F, ... )
user_handle |
The user's handle on Truth Social |
account_id |
The user's account ID on Truth Social |
limit |
The number of statuses to retrieve |
size |
The number of statuses per pagination |
verbose |
Whether to print information about pagination |
retry_on_timeout |
Whether to retry the request if a timeout occurs |
switch_token |
Whether to use a different API token for this request |
monitor |
Whether to monitor the API rate limit |
A data frame containing the statuses
untruth_user_statuses("truth_social", account_id = "107780257626128497") untruth_user_statuses("truth_social")untruth_user_statuses("truth_social", account_id = "107780257626128497") untruth_user_statuses("truth_social")