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

gewe-node-sdk

v1.1.8

Published

微信机器人gewe框架sdk工具包。通过node语言环境实现。

Readme

gewe-node-sdk

微信机器人gewe框架sdk工具包。通过node语言环境实现。通过axios实现封装api接口请求。

npm 仓库地址:https://www.npmjs.com/package/gewe-node-sdk

安装

npm install gewe-node-sdk

读取环境变量

appId: xxx
token: xxx

使用方法

commonjs 模式

const GeweBot = require('gewe-node-sdk');

async function main() {
    const bot = new GeweBot('你的-app-id', '你的-token');
    const contacts = await bot.getContactsList();
    console.log(contacts);
}

main();

modulejs 模式

import GeweBot from 'gewe-node-sdk';

async function main() {
    const bot = new GeweBot('你的-app-id', '你的-token');
    const contacts = await bot.getContactsList();
    console.log(contacts);
}

main();

配置 package.json

{
    "type": "module",
}

GeweBot 文档

| 函数名称 | 描述 | |----------|------| | constructor(appId = null, token = null, uuid = null) | 初始化 GeweBot,使用 appId(默认取环境变量)、token(默认取环境变量)和未使用的 uuid | | setToken(token) | 设置 API 请求的认证令牌 | | setAppId(appId) | 设置 API 请求的应用 ID | | setCallback(callbackUrl) | 设置登录操作回调 URL | | getPersonalProfile() | 获取当前用户个人资料信息 | | getContactsList() | 获取完整的联系人列表 | | getContactsBriefInfo(wxids) | 获取指定联系人 ID 简要信息 | | getContactsDetailInfo(wxids) | 获取指定联系人 ID 详细信息 | | getChatroomInfo(chatroomId) | 获取指定微信群的信息 | | sendTextMessage(toWxid, content, ats = null) | 向指定联系人发送文本消息:可选包含 @ | | sendImageMessage(toWxid, imgUrl) | 向指定联系人发送图片消息 | | sendLinkMessage(toWxid, imgUrl, title, desc, linkUrl, thumbUrl) | 向指定联系人发送带缩略图的链接消息 | | sendNameCardMessage(toWxid, nickName, nameCardWxid) | 向指定联系人发送名片消息 | | getClassroomMemberList(classroomId) | 获取指定微信群的成员列表 | | searchContacts(contactsInfo) | 根据提供的条件搜索联系人 | | addContacts(scene = 3, content, v3, v4, option = 2) | 添加新联系人:包括场景、验证内容、v3/v4 字段和添加选项 | | agreeJoinClassroom(url) | 通过邀请 URL 同意加入聊天室 |

发布步骤

# 1. 初始化 git 仓库(如果尚未完成)
git init
git add .
git commit -m "first commit"

# 2. 登录 npm(如果没有账号,请先在 npmjs.com 注册)
npm login

# 3. 发布到 npm
npm publish --access public

npm notice 
npm notice 📦  [email protected]
npm notice === Tarball Contents ===
npm notice 1.1kB README.md
npm notice 823B  package.json
npm notice 4.3kB src/core.js
npm notice === Tarball Details ===
npm notice name:          gewe-node-sdk
npm notice version:       1.0.0
npm notice filename:      gewe-node-sdk-1.0.0.tgz
npm notice package size:  2.0 kB
npm notice unpacked size: 6.2 kB
npm notice shasum:        b9db9894e3c5b875734c4612fc1ab699569a0110
npm notice integrity:     sha512-nuB4MEQVx+Hxy[...]bIYzIzxLp4YFg==
npm notice total files:   3
npm notice
npm notice Publishing to https://registry.npmjs.org with tag latest and public access

[email protected]