-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail if toots fail. Closes #7. Clarify call to action. Closes #51. Automatically update the LI API version. Closes #54.
- Loading branch information
1 parent
dbc1008
commit fd2c5fe
Showing
5 changed files
with
184 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
tt_toot <- function(status_msg, img_paths, alt_text) { | ||
rtoot::post_toot( | ||
status = status_msg, | ||
media = img_paths, | ||
alt_text = alt_text | ||
) | ||
i <- 0L | ||
status_code <- 0L | ||
while (status_code != 200L && i < 5L) { | ||
res <- rtoot::post_toot( | ||
status = status_msg, | ||
media = img_paths, | ||
alt_text = alt_text | ||
) | ||
status_code <- res$status_code | ||
i <- i + 1L | ||
} | ||
if (status_code != 200L) { | ||
stop("Mastodon broke!") | ||
} | ||
|
||
return(res) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.