{"id":26555230,"url":"https://github.com/wristwaking/gewe-node-sdk","last_synced_at":"2026-02-17T11:01:27.156Z","repository":{"id":283437774,"uuid":"942797992","full_name":"wristwaking/gewe-node-sdk","owner":"wristwaking","description":"微信机器人gewe框架sdk工具包。微信消息底层通过pad协议实现。框架通过node语言环境实现。通过axios实现封装api接口请求。","archived":false,"fork":false,"pushed_at":"2025-03-20T17:17:16.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T16:26:02.279Z","etag":null,"topics":["axios","javascript","node","sdk-javascript"],"latest_commit_sha":null,"homepage":"https://geweapi.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wristwaking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-04T17:33:50.000Z","updated_at":"2025-03-21T04:24:40.000Z","dependencies_parsed_at":"2025-03-22T00:15:21.895Z","dependency_job_id":null,"html_url":"https://github.com/wristwaking/gewe-node-sdk","commit_stats":null,"previous_names":["wristwaking/gewe-node-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wristwaking/gewe-node-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wristwaking%2Fgewe-node-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wristwaking%2Fgewe-node-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wristwaking%2Fgewe-node-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wristwaking%2Fgewe-node-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wristwaking","download_url":"https://codeload.github.com/wristwaking/gewe-node-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wristwaking%2Fgewe-node-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29541119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","javascript","node","sdk-javascript"],"created_at":"2025-03-22T10:25:32.615Z","updated_at":"2026-02-17T11:01:27.148Z","avatar_url":"https://github.com/wristwaking.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gewe-node-sdk\n微信机器人gewe框架sdk工具包。通过node语言环境实现。通过axios实现封装api接口请求。\n\nnpm 仓库地址：https://www.npmjs.com/package/gewe-node-sdk\n\n## 安装\n```bash\nnpm install gewe-node-sdk\n```\n\n## 读取环境变量\n```\nappId: xxx\ntoken: xxx\n```\n\n## 使用方法\ncommonjs 模式\n```js\nconst GeweBot = require('gewe-node-sdk');\n\nasync function main() {\n    const bot = new GeweBot('你的-app-id', '你的-token');\n    const contacts = await bot.getContactsList();\n    console.log(contacts);\n}\n\nmain();\n```\nmodulejs 模式\n```js\nimport GeweBot from 'gewe-node-sdk';\n\nasync function main() {\n    const bot = new GeweBot('你的-app-id', '你的-token');\n    const contacts = await bot.getContactsList();\n    console.log(contacts);\n}\n\nmain();\n```\n配置 package.json\n```json\n{\n    \"type\": \"module\",\n}\n```\n\n## GeweBot 文档\n\n\n| 函数名称 | 描述 |\n|----------|------|\n| `constructor(appId = null, token = null, uuid = null)` | 初始化 GeweBot，使用 appId（默认取环境变量）、token（默认取环境变量）和未使用的 uuid |\n| `setToken(token)` | 设置 API 请求的认证令牌 |\n| `setAppId(appId)` | 设置 API 请求的应用 ID |\n| `setCallback(callbackUrl)` | 设置登录操作回调 URL |\n| `getPersonalProfile()` | 获取当前用户个人资料信息 |\n| `getContactsList()` | 获取完整的联系人列表 |\n| `getContactsBriefInfo(wxids)` | 获取指定联系人 ID 简要信息 |\n| `getContactsDetailInfo(wxids)` | 获取指定联系人 ID 详细信息 |\n| `getChatroomInfo(chatroomId)` | 获取指定微信群的信息 |\n| `sendTextMessage(toWxid, content, ats = null)` | 向指定联系人发送文本消息：可选包含 @ |\n| `sendImageMessage(toWxid, imgUrl)` | 向指定联系人发送图片消息 |\n| `sendLinkMessage(toWxid, imgUrl, title, desc, linkUrl, thumbUrl)` | 向指定联系人发送带缩略图的链接消息 |\n| `sendNameCardMessage(toWxid, nickName, nameCardWxid)` | 向指定联系人发送名片消息 |\n| `getClassroomMemberList(classroomId)` | 获取指定微信群的成员列表 |\n| `searchContacts(contactsInfo)` | 根据提供的条件搜索联系人 |\n| `addContacts(scene = 3, content, v3, v4, option = 2)` | 添加新联系人：包括场景、验证内容、v3/v4 字段和添加选项 |\n| `agreeJoinClassroom(url)` | 通过邀请 URL 同意加入聊天室 |\n\n## 发布步骤\n\n```bash\n# 1. 初始化 git 仓库（如果尚未完成）\ngit init\ngit add .\ngit commit -m \"first commit\"\n\n# 2. 登录 npm（如果没有账号，请先在 npmjs.com 注册）\nnpm login\n\n# 3. 发布到 npm\nnpm publish --access public\n\nnpm notice \nnpm notice 📦  gewe-node-sdk@1.0.0\nnpm notice === Tarball Contents ===\nnpm notice 1.1kB README.md\nnpm notice 823B  package.json\nnpm notice 4.3kB src/core.js\nnpm notice === Tarball Details ===\nnpm notice name:          gewe-node-sdk\nnpm notice version:       1.0.0\nnpm notice filename:      gewe-node-sdk-1.0.0.tgz\nnpm notice package size:  2.0 kB\nnpm notice unpacked size: 6.2 kB\nnpm notice shasum:        b9db9894e3c5b875734c4612fc1ab699569a0110\nnpm notice integrity:     sha512-nuB4MEQVx+Hxy[...]bIYzIzxLp4YFg==\nnpm notice total files:   3\nnpm notice\nnpm notice Publishing to https://registry.npmjs.org with tag latest and public access\n\ngewe-node-sdk@1.0.0\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwristwaking%2Fgewe-node-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwristwaking%2Fgewe-node-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwristwaking%2Fgewe-node-sdk/lists"}