Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fishpi

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fishpi

A Package to use API of fishpi.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
328
Maintainers
1
Weekly downloads
 
Created
Source

摸鱼派 API Package

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

支援

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

安装

npm install fishpi

用例

import FishPi from 'fishpi';

// 登录获取 apiKey
let apiKey = '';
let fish = new FishPi();
let rsp = await fish.login({ 
    username: 'username', 
    passwd: 'password123456' 
});
if (rsp.code == 0) apiKey = rsp.Key;

// 通过 apiKey 获取登录用户信息
let fish = new FishPi(apiKey);
console.dir(await fish.info());

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

// 监听聊天室消息
fish.chatroom.addListener((ev:any) => console.dir(ev));
// 向聊天室发送信息(需要登录)
fish.chatroom.send('Hello World!');
// 向聊天室发送红包
fish.chatroom.redpacket.send({
    type: 'random';
    money: 32;
    count: 2;
    msg: '摸鱼者,事竟成!';
    recivers: [];
})

FAQs

Package last updated on 23 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc