-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
63 lines (44 loc) · 2.35 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# remmy
<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/remmy)](https://CRAN.R-project.org/package=remmy)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/long39ng/remmy/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/long39ng/remmy/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/long39ng/remmy/branch/main/graph/badge.svg)](https://app.codecov.io/gh/long39ng/remmy?branch=main)
<!-- badges: end -->
An HTTP API client for [Lemmy](https://github.com/LemmyNet/lemmy) in R.
Code and [documentation](https://long39ng.github.io/remmy/reference/index.html) are [generated](https://github.com/long39ng/remmy/tree/main/dev) from the [official JavaScript client](https://github.com/LemmyNet/lemmy-js-client) source.
Lemmy version: [0.18.1](https://github.com/LemmyNet/lemmy/releases/tag/0.18.1)
## Installation
You can install the released version of remmy from CRAN:
``` r
install.packages("remmy")
```
Or install the development version of remmy from GitHub with:
``` r
# install.packages("devtools")
devtools::install_github("long39ng/remmy")
```
## Example
``` r
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](https://github.com/long39ng/remmy/tree/main/dev) was made possible by:
- [ts-morph](https://github.com/dsherret/ts-morph) for navigating the TypeScript AST of the [official JavaScript client](https://github.com/LemmyNet/lemmy-js-client) source and extracting the HTTP request methods into JSON.
- [jsonlite](https://github.com/jeroen/jsonlite) for parsing objects from JSON to R.
- [rlang](https://github.com/r-lib/rlang) (and the [metaprogramming capabilities of R](https://adv-r.hadley.nz/expressions.html)) for programmatically generating function definitions and parameter and return type documentation.