Metadata-Version: 2.1
Name: fishpi
Version: 0.2.1
Summary: Package used to Call All FishPi API.
Home-page: https://github.com/FishPiOffical/fishpi.py
Author: Hancel.Lin
Author-email: imlinhanchao@gmail.com
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rel
Requires-Dist: requests
Requires-Dist: websocket-client


# 摸鱼派 API Package
摸鱼派社区 (https://fishpi.cn/) 的 API Package，可以快速开发出一款应用支援社区功能。

## 支援
- 用户信息；
- 聊天室；
- 文件上传；
- 通知信息；

## 安装

```bash
pip install fishpi
```

## 用例

```python
from fishpi import FishPi

# 登录获取 apiKey
apiKey = ''
fish = FishPi()
rsp = fish.login(
    username='username', 
    passwd='password123456',
    mfaCode='789546'
)
if rsp['code'] == 0:
    apiKey = rsp.Key

# 通过 apiKey 获取登录用户信息
fish = FishPi(apiKey)
fish.account.info()

# 获取用户自定义表情包
emojis = fish.emoji.get()
# 获取默认表情包
defaultEmoji = fish.emoji.default

# 监听聊天室消息
fish.chatroom.add_listener(lambda msg: print(msg))
# 向聊天室发送信息（需要登录）
fish.chatroom.send('Hello World!')
# 向聊天室发送红包
fish.chatroom.redpacket.send(
    type='random',
    money=32,
    count=2,
    msg='摸鱼者，事竟成！',
)

```
