Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonicd/slackblocks
Slack Blocks in R
https://github.com/yonicd/slackblocks
r slack slackapi
Last synced: about 2 months ago
JSON representation
Slack Blocks in R
- Host: GitHub
- URL: https://github.com/yonicd/slackblocks
- Owner: yonicd
- License: other
- Created: 2020-02-05T01:27:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T20:28:35.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T21:28:53.507Z (3 months ago)
- Topics: r, slack, slackapi
- Language: R
- Homepage: https://yonicd.github.io/slackblocks/
- Size: 442 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - yonicd/slackblocks - Slack Blocks in R (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# slackblocks
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![Covrpage Summary](https://img.shields.io/badge/covrpage-Last_Build_2023_02_27-brightgreen.svg)](http://tinyurl.com/tf2xf4d)
[![R-CMD-check](https://github.com/yonicd/slackblocks/actions/workflows/r-cmd-check.yml/badge.svg)](https://github.com/yonicd/slackblocks/actions/workflows/r-cmd-check.yml)
[![Codecov test coverage](https://codecov.io/gh/yonicd/slackblocks/branch/master/graph/badge.svg)](https://codecov.io/gh/yonicd/slackblocks?branch=master)`slackblocks` is a part of `slackverse`
```{r,echo = FALSE, eval = TRUE}
pkgs <- sprintf('slack%s',c('calls','teams','posts','blocks','threads','reprex'))badges <- sprintf('%s
[![](https://github.com/yonicd/%s/actions/workflows/r-cmd-check.yml/badge.svg)](https://github.com/yonicd/%s)',pkgs,pkgs,pkgs)names(badges) <- pkgs
```
||||
|:-:|:-:|:-:|
||`r badges[pkgs[1]]`||
|`r badges[pkgs[5]]`|`r badges[pkgs[2]]`|`r badges[pkgs[3]]`|
|||`r badges[pkgs[4]]`|
|||`r badges[pkgs[6]]`|The goal of slackblocks is to build Slack block elements in `R`.
## Installation
``` r
# install.packages("remotes")
remotes::install_github("yonicd/slackblocks")
```
## ExampleThis is a basic example which shows you how to solve a common problem:
```{r example}
library(slackblocks)
``````{r}
block_text('my text')
``````{r}
image_element('url_to_image')
``````{r}
(b <- section_block(
text = block_text(
text = 'A message *with some bold text* and _some italicized text_.'),
fields = list(
block_text('*Priority*'),
block_text('*Type*'),
block_text('High'),
block_text(':heavy_check_mark:')
)
))
```## Posting Blocks to Slack
```{r,eval=FALSE}
post_block(b, channel = 'CHANNELID')
``````{r,echo=FALSE}
knitr::include_graphics('man/figures/sections.png')
```