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

quboqin-padlocal-client-ts

v0.5.4

Published

Padlocal ts client

Readme

padlocal-client-ts

NPM Version TypeScript Stage

本项目是 PadLocal 的 TypeScript 客户端,JavaScript 项目也可以。同时作为核心组件,为 wechaty-puppet-padlocal 提供了聊天机器人相关功能的技术支持。

如何使用

和 Wechaty 一起使用

如果你是聊天机器人的初学者,建议先尝试 Wechaty 。Wechaty 是一个非常易用的聊天机器人框架,有丰富的技术文档和优秀的社区,被广大开发者喜爱。

如果你熟悉甚至已经在使用 Wechaty,那么你可以将 wechaty-puppet-padlocal 作为 Wechaty 的 puppet 来使用,支持和其他 puppet 无缝切换。因为 wechaty-puppet-padlocal 是一个完整的 Wechaty puppet 实现,且由 padlocal-client-ts 提供技术支持。

系统架构

直接使用

当然 padlocal-client-ts 也支持直接单独使用。我们为你提供了一个可以快速开始的 demo 项目

  1. 安装 node https://nodejs.org/en/
  2. 下载 demo 项目并安装依赖
$ git clone [email protected]:padlocal/padlocal-client-ts-demo.git

$ cd padlocal-client-ts-demo
$ npm install

将你的 PadLocal token 配置在代码 main.ts

  ////////////////// 在这里填入你的 PadLocal Token //////////////////
  const token: string = "puppet_padlocal_xxx";
  ////////////////////////////////////////////////////////////////
  1. 运行 demo
$ npm run demo

命令行中则会出现二维码,然后扫码登录即可。

00:00:00 INFO
      ============================================================
                    Welcome to padlocal-client-ts !
                           version: 0.2.32
      ============================================================

start login
start login with type:  0

▼▼▼ Please scan following qr code to login ▼▼▼

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █▄▄████ █▄▄ ▄▀█ ▄▄▄▄▄ █
█ █   █ █ ▀█ ▄ ▀  █▄ ▀█ █   █ █
█ █▄▄▄█ █▄ ▄▄▀ ██ ██ ▀█ █▄▄▄█ █
█▄▄▄▄▄▄▄█▄▀▄▀▄█▄▀▄▀ ▀▄█▄▄▄▄▄▄▄█
█▄▄ ▄██▄█ ▀████▀█▀▄ ▀█ ▀▀ ▄▄█ █
█▄▄ █▀ ▄▀ ██▀▀  █▀▄▀▀▀▄▄█▀▀▄▄▀█
█ █ ▀█▀▄ ▀ ▀ █▄█▄  ▀ █▄▀██▄▄▀▀█
█▄ ▄▀█▀▄█▄ ██ ▄█▀▀██   ▀██▄▄ ▄█
█▄ █▀  ▄▀▄  ▄▀ █ ██▀▄  █▀▄█▀ ██
█ ▄▄▄▄▄ ██▄ ▄▄▀▄████▄ █▄█ ▄█ ██
█ █   █ █▀▀ ▀ ▀▄█▀▀▀█▄ ▄    ▄ █
█ █▄▄▄█ █  ▄ ██ ▀▄▄▀█  █ ▀▀▄▀▄█
█▄▄▄▄▄▄▄█▄█▄███▄▄█▄▄█▄▄█████▄██

你也可以查阅本项目的测试用例,里面有大量的详细使用示例:https://github.com/padlocal/padlocal-client-ts/tree/master/tests 。 可以特别关注如下文件:

  • Common.ts
  • PadLocalClient-login.test.ts
  • PadLocalClient-push.test.ts
  • PadLocalClient-api.test.ts

API

所有支持的 API 请参见:

  • PadLocalClientApi.ts

How to apply token

TOKEN 申请方法