An HTTP API client for Lemmy in R.
Code and documentation are generated from the official JavaScript client source.
Lemmy version: 0.18.1
Installation
You can install the released version of remmy from CRAN:
install.packages("remmy")
Or install the development version of remmy from GitHub with:
# install.packages("devtools")
devtools::install_github("long39ng/remmy")
Example
library(remmy)
example_comment <- lemmy_get_comment(546564)
example_comment$comment_view$comment$content
#> [1] "I am not by nature a sentimental person regarding software but I will truly miss RiF."
Acknowledgements
Source code generation was made possible by:
- ts-morph for navigating the TypeScript AST of the official JavaScript client source and extracting the HTTP request methods into JSON.
- jsonlite for parsing objects from JSON to R.
- rlang (and the metaprogramming capabilities of R) for programmatically generating function definitions and parameter and return type documentation.