slackr_history {slackr} | R Documentation |
Reads history of a channel.
Description
Returns a dataframe of post history in a channel.
Usage
slackr_history(
message_count = 100,
channel = Sys.getenv("SLACK_CHANNEL"),
token = Sys.getenv("SLACK_TOKEN"),
posted_to_time = as.numeric(Sys.time()),
duration = NULL,
posted_from_time = 0,
paginate = FALSE,
inclusive = TRUE
)
Arguments
message_count |
The number of messages to retrieve (only when |
channel |
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. |
token |
Authentication token bearing required scopes. |
posted_to_time |
Timestamp of the last post to consider.
Corresponds to |
duration |
Number of hours of history to retrieve. If neither |
posted_from_time |
Timestamp of the first post time to consider. If both
posted_to_time and duration is specifed, they take precedence.
Corresponds to |
paginate |
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 |
inclusive |
Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified. |
Value
A tibble
with message metadata
Scopes
You need one or more of these scopes enabled in your slack app: * channels:history * groups:history * im:history * mpim:history
References
https://api.slack.com/methods/conversations.history