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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vhxnyu/potato

v0.1.1

Published

这是 [土豆云](http://doc.xudakj.xyz/) 的 API 封装, 提供类型提示和自动完成

Downloads

1

Readme

Potato

这是什么?

这是 土豆云 的 API 封装, 提供类型提示和自动完成

安装

使用 npm

npm i @vhxnyu/potato

使用 zdjl

const { Potato } = require('@vhxnyu/[email protected]')

用例

// 根据你的 环境/适用的模块规范 三选一

// node esm
import { Potato } from '@vhxnyu/potato'

// node cjs
const { Potato } = require('@vhxnyu/potato')

// zdjl
const { Potato } = require('@vhxnyu/[email protected]')


// 实例化
const app = new Potato({
  // 可选项, 为空则无法使用
  appToken: 'askKey',
  // 可选项, 为空则不启用
  sign: '签名',
  // 可选项, 为空则不启用
  cryptoKey: '加解密密钥',
  // 可选项, 加密请求数据使用的算法, 这里使用RC4作为示例, 不填的话默认使用AES ECB PKcs#7/5
  encryptMethod: Potato.CryptoMethod.RC4
  // 可选项, 解密响应数据使用的算法, 这里使用RC4作为示例, 不填的话默认使用AES ECB PKcs#7/5
  decryptMethod: Potato.CryptoMethod.RC4
  // 可选项, 用户令牌,如果没有缓存的话也可以在稍后设置
  userToken: '用户令牌',
})

// 所有的预设参数都可以稍后修改, 像这样:
app.login({userNumber: 'user', passWord: 'pwd'}).then(res =>{
  app.presets.userToken = res.data.apiUserToken
})

// 试试获取你的应用信息:
app.getAppInfo().then(console.log).catch(console.error)

Potato

  • Potato.CryptoMethod

    加密/解密算法列表

  • Potato.defaultPresets

    创建时使用的默认预设

  • Potato: CryptoMethod

    加密/解密算法列表

  • Potato: presets

    预设

  • Potato._axios

    内部使用的 axios 实例

App itself

  • Potato.prototype.getNotice()

    获取应用公告

  • Potato.prototype.getAppInfo()

    获取应用信息

  • Potato.prototype.updateApp()

    获取应用新版本

  • Potato.prototype.sendEmailByUser()

    发送邮件

  • Potato.prototype.startApp()

    应用启动计数

  • Potato.prototype.getAppUpdateLog()

    获取更新记录

  • Potato.prototype.feedBack()

    反馈

  • Potato.prototype.getDoc()

    获取文档

  • Potato.prototype.sendWeChatMessage()

    发送微信提醒

Message boards 留言板

  • Potato.prototype.messageBoard()

    添加一则留言

  • Potato.prototype.getMessageBoardList()

    获取留言板列表

User

  • Potato.prototype.register()

    注册

  • Potato.prototype.registerV2()

    注册

  • Potato.prototype.login()

    登录

  • Potato.prototype.findUserInfo()

    查询用户信息

  • Potato.prototype.updateUserInfo()

    修改用户信息

  • Potato.prototype.updatePassWord()

    修改用户密码

  • Potato.prototype.getCodeImg()

    获取登录验证码图片

  • Potato.prototype.sendEmailMessage()

    发送验证码到邮箱

  • Potato.prototype.signInUser()

    用户签到

  • Potato.prototype.getSignInList()

    获取签到排行榜

Payment system 支付

  • Potato.prototype.createOrder()

    创建订单

  • Potato.prototype.pay()

    发起支付

  • Potato.prototype.searchOrder()

    搜索订单

  • Potato.prototype.getUserBalanceList()

    查询用户余额流水

  • Potato.prototype.userByVipWithBalance()

    用户使用余额购买会员

  • Potato.prototype.updateUserBalance()

    修改用户余额接口

  • Potato.prototype.getVipList()

    获取会员列表

Shop 商店

  • Potato.prototype.getGoodsList()

    获取商品列表

  • Potato.prototype.getLabelList()

    获取商品标签

Card Key 卡密

  • Potato.prototype.verifyCardV2()

    卡密校验

  • Potato.prototype.verifyCardV1()

    卡密校验

  • Potato.prototype.unbindCard()

    卡密解绑设备

  • Potato.prototype.createCardMy()

    用户生成卡密接口

  • Potato.prototype.getCardMyList()

    查询用户生成卡密列表

License 许可证

MIT