Skip to main content

Package used to Call All FishPi API.

Project description

摸鱼派 API Package

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

支援

  • 用户信息;
  • 聊天室;
  • 文件上传;
  • 通知信息;

安装

pip install fishpi

用例

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='摸鱼者,事竟成!',
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fishpi-0.2.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fishpi-0.2.1-py2.py3-none-any.whl (11.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fishpi-0.2.1.tar.gz.

File metadata

  • Download URL: fishpi-0.2.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for fishpi-0.2.1.tar.gz
Algorithm Hash digest
SHA256 13e563e46f8f94d930c597bc211a2d7306733730cb2d872d48ac8e3470e49763
MD5 f3bc99d8dc51ca22c876bbdc124688f5
BLAKE2b-256 6fcd2a46de67a41bcea4df65546a33c747b1060919d00691f8b02700ee8a64e3

See more details on using hashes here.

File details

Details for the file fishpi-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: fishpi-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for fishpi-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7aa1021fb869ba081eff9ad46bac8701588c5df43ae4c06a31dfdcc978048770
MD5 5cc8badfaab8a75f3cf582dd9c051033
BLAKE2b-256 9d93f112604d22fac44294a520f792460d09cb3d80b7a9b07697aed3ce4ef898

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page