Lấy nội dung của Slack
Lấy nội dung của Slack
Returns the content of the discussion with the specified ID. A discussion can be a Slack or Discord chat. The response contains two fields: discussion_content, which includes the main messages of the chat, and thread_contents, which contains the threads of the discussion.
The ID of the discussion to retrieve contents for. Discussions are either Slack or Discord chats.
Indicate the integration of the discussion. Currently, it can only be "slack" or "discord".
Indicate the starting time when we want to retrieve the content of the discussion in ISO 8601 format at GMT+0. If not specified, the default time is now.
Indicate the ending time when we want to retrieve the content of the discussion in ISO 8601 format at GMT+0. If not specified, it is 7 days before the "from" parameter.
Main and threaded messages of the discussion in a time range.
Discussion not found.
Internal server error.
Ví dụ Yêu cầu
Lấy nội dung Slack trong tuần qua
to_date = datetime.now().isoformat() + "Z" from_date = (datetime.now() - timedelta(days=7)).isoformat() + "Z"
get_slack_contents(12345, from_date, to_date)
Phản hồi lỗi
404
Không tìm thấy cuộc thảo luận
500
Lỗi máy chủ nội bộ
Điểm cuối này truy xuất nội dung của một kênh Slack hoặc cuộc trò chuyện tin nhắn trực tiếp. Nó trả về cả tin nhắn chính của kênh (discussion_content) và các phản hồi theo chủ đề (thread_contents). Dữ liệu được tổ chức theo thứ tự thời gian và bao gồm thông tin người dùng, giúp dễ dàng hiểu ngữ cảnh của các cuộc trò chuyện.
Các tham số khoảng thời gian cho phép bạn tập trung vào các khoảng thời gian cụ thể, điều này đặc biệt hữu ích cho việc xem xét hoạt động gần đây hoặc các cuộc thảo luận lịch sử.
Last updated