README.md

slackthreads

Lifecycle:
experimental Covrpage
Summary R-CMD-check Codecov test
coverage

slackthreads is a part of slackverse

| | | | | :-----------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------: | | | slackcalls | | | slackthreads | slackteams | slackposts | | | | slackblocks | | | | slackreprex |

The goal of slackthreads is to interact with the Slack API to retrieve and interrogate team conversations.

Installation

remotes::install_github("yonicd/slackthreads")

In the Tin

Example Using R4DS Slack

library(slackteams)
library(slackthreads)

Load the Team

slackteams::load_teams()
slackteams::activate_team('R4ds')

Retrieve Team Channels

chnls <- slackteams::get_team_channels()

 # r4ds has channels to ask questions in
question_channels <- grep('^help-',chnls$name,value = TRUE)

question_channels

Retrieve Conversations

This will retrieve the last 20 messages from the “help-1-explore_wrangle” channel.


convos <- conversations(
  channel = 'help-1-explore_wrangle', 
  limit = 20, 
  max_results = 20
)

Check that request was returned ok and that up to 20 were returned.

length(convos)

There are the following replies to the first message

convos[[1]]$reply_count


yonicd/threads documentation built on March 27, 2023, 8:45 a.m.