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.addListener(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.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for fishpi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 844df3052b889677d9138966b708e8ca37a27a890530da0ae580b1ba69a9c939
MD5 550a047d43ab78ba857685ef0a9a2aa2
BLAKE2b-256 3e966e45718090405a82cbb47b1bafe31ab746e7c5c42a9622191c87e4d5153c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fishpi-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3a4f3a5d3aa50c621de2f89bcf33a38bd484b850b417b014cff5d96a076c88eb
MD5 3b0902407fa65be64a091ac3d7198757
BLAKE2b-256 51e7e78d221c2f29a8f339988b98205a15fa5f4c542b24ad38b1804f3e30e612

See more details on using hashes here.

Supported by

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