npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

biwow-api

v1.5.1

Published

## 1 安装

Downloads

153

Readme

前端API使用

1 安装

Node

npm install biwow-api

Yarn

yarn add biwow-api

2 使用

示例一

import API from "biwow-api"
import { ContentArticleResponseData, ContentArticleData } from "biwow-api/src/api/content";

const newsDetail = ref<ContentArticleData>({
  id: "",
  channelId: "",
  title: "",
  content: "",
  status: "",
  create_time: "",
  update_time: "",
})
const getDetail = async (value: string) => {
  let res: ContentArticleResponseData = await new API("toke").content.viewArticle(value)
  newsDetail.value = res.data
}
const id = route.query.id as string
getDetail(id)

示例二

import API from "biwow-api"
import { UserAccessTokenResponseData } from "biwow-api/src/api/user";
import { PluginsInfoListResponseData } from "biwow-api/src/api/plugin";

const getRes = async ()=> {
  let res: UserAccessTokenResponseData = await new API("toke").user.viewAccessToken("3032316635")
  console.log(JSON.stringify(res.data.did));
}
const getRes1 = async ()=> {
  let res: PluginsInfoListResponseData = await new API("toke").plugin.listInfo("1","10")
  console.log(JSON.stringify(res.data.records));
}

getRes()
getRes1()

3 模块介绍

3.1 内容模块(content)

| 方法 | 说明 | | --- | --- | | createChannel(pid: string, channelName: string) | 创建内容分类 | | updateChannel(id: string, pid: string, channelName: string) | 更新内容分类 | | deleteChannel(id: string) | 删除内容分类 | | listChannel(pageNum: string, pageSize: string) | 显示内容分类列表 | | createArticle(channelId: string, title: string, content: string) | 创建内容 | | updateArticle(id: string, channelId: string, title: string, content: string, status: string) | 更新内容 | | deleteArticle(id: string) | 删除内容 | | listArticle(pageNum: string, pageSize: string) | 显示内容列表 | | viewArticle(id: string) | 显示指定内容 | | createSingle(title: string, content: string) | 创建单页内容 | | updateSingle(id: string, title: string, content: string, status: string) | 更新单页内容 | | deleteSingle(id: string) | 删除单页内容 | | listSingle(pageNum: string, pageSize: string) | 显示单页内容列表 | | viewSingle(id: string) | 显示指定单页内容 |

3.2 文件模块(file)

| 方法 | 说明 | | --- | --- | | upload(file: File) | 上传文件 | | list(pageNum: string, pageSize: string) | 显示文件列表 | | view(hash: string) | 显示指定文件 |

3.3 后台管理模块(manager)

| 方法 | 说明 | | --- | --- | | loginByUsername(username: string, password: string) | 使用用户名登录 | | loginByPhone(phone: string, code: string) | 使用手机号登录 | | loginByPlugin(pluginToken: string) | 使用浏览器插件token登录 | | createRole(code: string, name: string, description: string) | 创建角色 | | updateRole(id: string, code: string, name: string, description: string, sequence: string, status: string) | 更新角色 | | deleteRole(id: string) | 删除角色 | | listRole(pageNum: string, pageSize: string) | 显示角色列表 | | viewRole(id: string) | 显示指定角色 | | createMenu(parentId: string, type: string, code: string, name: string, path: string, method: string, apiPath: string) | 创建菜单 | | updateMenu(id: string, parentId: string, type: string, code: string, name: string, path: string, method: string, apiPath: string, sequence: string, status: string) | 更新菜单 | | deleteMenu(id: string) | 删除菜单 | | listMenu(pageNum: string, pageSize: string) | 显示菜单列表分页 | | viewMenu(id: string) | 显示指定菜单 | | listAllMenu() | 显示所有菜单 | | currentUser() | 获取当前用户信息 | | refreshToken() | 更换新token | | createUser(username: string, name: string, password: string, phone: string, remark: string) | 创建用户 | | updateUser(id: string, username: string, name: string, password: string, phone: string, remark: string, status: string) | 更新用户 | | resetPassword(id: string) | 重置用户密码 | | modifyPassword(id: string, newPassword: string, oldPassword: string) | 修改指定用户密码 | | deleteUser(id: string) | 删除指定用户 | | listUser(pageNum: string, pageSize: string) | 显示用户列表分页 | | viewUser(id: string) | 显示指定用户 |

3.4 插件管理模块(plugin)

| 方法 | 说明 | | --- | --- | | createInfo(pluginsName: string, pluginsEName: string, pluginsVersion: string, pluginsImages: string, pluginsPrice: string, pluginsMarketPrice: string, pluginsContent: string) | 创建插件 | | updateInfo(id: string, pluginsName: string, pluginsEName: string, pluginsVersion: string, pluginsImages: string, pluginsPrice: string, pluginsMarketPrice: string, pluginsContent: string) | 更新插件 | | deleteInfo(id: string) | 删除插件 | | listInfo(pageNum: string, pageSize: string) | 显示插件列表分页 | | viewInfo(id: string) | 显示指定插件 | | createOrder(buyer: string, pluginsId: string) | 创建插件订单 | | updateOrder(id: string, orderNo: string, buyer: string, payType: string, pluginsId: string, amount: string, payStatus: string, downHash: string) | 更新插件订单 | | deleteOrder(id: string) | 删除插件订单 | | listOrder(pageNum: string, pageSize: string) | 显示插件订单列表分页 | | viewOrder(id: string) | 查看指定插件订单 | | listOrderByUser(pageSize: string, pageNum: string, did: string) | 查看指定用户插件订单列表分页 |

3.5 短信插件(sms)

| 方法 | 说明 | | --- | --- | | sendCodeByAli(phone: string) | 发送短信验证码(阿里云) | | sendCodeBySandbox(phone: string) | 发送短信验证码(沙盒默认6666) | | logList(pageNum: string, pageSize: string) | 显示发送短息记录列表分页 |

3.6 单点登录插件(sso)

| 方法 | 说明 | | --- | --- | | loginByKey(pubkey: string, timestamp: string, sign: string) | 使用公钥和签名获取登录Token |

3.7 用户插件(user)

| 方法 | 说明 | | --- | --- | | createUserInfo(did: string, username: string, nickname: string, sex: string, avatar: string, phone: string, email: string) | 创建用户 | | updateUserInfo(id: string, did: string, username: string, nickname: string, sex: string, avatar: string, phone: string, email: string) | 更新用户 | | deleteUserInfo(id: string) | 删除用户 | | listUserInfo(pageNum: string, pageSize: string) | 显示用户列表分页 | | viewUserInfo(id: string) | 显示指定用户 | | loginByPlugin(pluginToken: string) | 使用浏览器插件Token登录 |