-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
86 lines (66 loc) · 2.26 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
output: pal::gitlab_document
---
```{r}
#| label: init
#| include: false
knitr::opts_knit$set(root.dir = getwd())
library(rlang,
include.only = "%|%")
library(magrittr,
include.only = c("%>%", "%<>%", "%T>%", "%!>%", "%$%"))
```
# `r pal::desc_value("Package")`
```{r}
#| label: pkg-desc
#| child: !expr pkgsnip::snip_path("pkg-desc.Rmd")
```
In contrast to the [**gitlabr**](https://thinkr-open.github.io/gitlabr/) package, this package is built upon [httr2](https://httr2.r-lib.org/) and features a
thoroughly designed [`api_req()`](https://gitlab.rpkg.dev/reference/api_req) core function that easily allows to implement the RESTful API like it's meant to be
used, including light-weight ("cached") requests etc. The package is designed in a [purely
functional](https://en.wikipedia.org/wiki/Purely_functional_programming) way[^1]. However, note that gitlabr still covers many more API endpoints than this
package.
```{r}
#| label: pkg-doc
#| eval: !expr '!isTRUE(getOption("pal.build_readme.is_pkgdown"))'
#| results: asis
#| echo: false
pkgsnip::md_snip(id = "pkgdown_site") %>%
paste0("## Documentation\n\n",
"[]",
"(https://app.netlify.com/sites/gitlab-rpkg-dev/deploys)\n\n",
.) |>
pal::cat_lines()
```
[^1]: Thanks to [pal's canonicalized way to package configuration](https://pal.rpkg.dev/reference/#package-configuration), setting necessary state globally like
the API's base URL and access token is still easy for users and transparent for developers.
## Installation
```{r}
#| label: pkg-instl-dev
#| child: !expr pkgsnip::snip_path("pkg-instl-dev-gitlab.Rmd")
```
```{r}
#| label: pkg-usage
#| eval: !expr isTRUE(getOption("pal.build_readme.is_pkgdown"))
#| results: asis
#| echo: false
pkgsnip::md_snip(id = "pkg_usage") %>%
paste0("## Usage\n\n", .) |>
pal::cat_lines()
```
## Package configuration
```{r}
#| label: pkg-config
#| child: !expr pkgsnip::snip_path("funky-config.Rmd")
```
## Development
### R Markdown format
```{r}
#| label: pkgpurl
#| child: !expr pkgsnip::snip_path("pkgpurl.Rmd")
```
### Coding style
```{r}
#| label: pkg-code-style
#| child: !expr pkgsnip::snip_path("pkg-code-style.Rmd")
```