Metadata-Version: 2.1
Name: slackhistory
Version: 0.3.5
Summary: A slack helper library to get history (messages and replies) of a channel
Home-page: https://github.com/AlexFangSW/slack_history
Author: AlexFangSW
Author-email: alexfangsw@gmail.com
License: MIT
Keywords: slackhistory,slack history,slack helper
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: slack-sdk >=3.23.0
Requires-Dist: aiohttp >=3.8.6

# Slack History

A Slack helper library to get the history (messages and replies) of a channel


## Installation
```bash
pip install slackhistory
```

## Quick start
```python
import asyncio
from slackhistory import SlackHelper
from slackhistory.type.slack_types import SlackMessageAndReply
from os import environ


async def main():
    slack_helper = SlackHelper(token=environ.get("TOKEN", ""))

    # end_date is optional
    message_and_replies: SlackMessageAndReply = await slack_helper.get_message_and_replies(
        "alex-playground", start_date="2023-10-28 08:00:00", end_date="2023-11-4 22:00:00")

    # the result can be converted to dict or json
    print(message_and_replies.to_dict())
    print(message_and_replies.to_json())


if __name__ == "__main__":
    asyncio.run(main())
```
Example Result: [example_result.json](./examples/example_result.json)
