Returns a dataframe of post history in a channel.
slackr_history(
channel = Sys.getenv("SLACK_CHANNEL"),
bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN"),
posted_to_time = as.numeric(Sys.time()),
message_count,
duration,
posted_from_time,
paginate = FALSE
)
The channel to get history from
the Slack bot user OAuth token
Timestamp of the last post to consider (default: current time)
The number of messages to retrieve (only when paginate = FALSE
)
Number of hours of history to retrieve. By default retrieves 24 hours of history.
Timestamp of the first post time to consider
If TRUE, uses the Slack API pagination mechanism, and will retrieve all history inside the timeframe. Otherwise, makes a single call to the API and retrieves a maximum of message_count
messages
A tibble
with message metadata
You need one or more of these scopes enabled in your slack app: * channels:history * groups:history * im:history * mpim:history