Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wechat-tools

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wechat-tools - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

lib/history.js

14

package.json
{
"name": "wechat-tools",
"version": "0.0.0",
"description": "this is a plug for wechat",
"version": "0.0.1",
"description": "wechat 回复小工具 ,包括天气预报、历史今天等实用功能",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"wechat"
"wechat",
"weixin"
],
"author": "netpi",
"license": "ISC"
"dependencies": {
"urllib": "^1.5.2"
}
}

@@ -1,1 +0,35 @@

## This is plug for wechat
## wechat-tools 是微信公众平台开发者的实用小工具
## 安装
```
npm install wechat-tools -save;
```
## 使用
### 1 回复天气预报
此为共享 ak = uD67wmZzhi3RFcmTkGoks2Dr,实际应用时建议去[百度开发者](developer.baidu.com/map/index.php)自行申请ak
```
var wt = request('wechat-tools');
var ak = 'uD67wmZzhi3RFcmTkGoks2Dr';//
var city = '北京';
wt.weather(ak,city,function(err , data){
if(err){
throw err;
}else{
console.log(data);
}
});
```
#### console.log(data); 结果如下图
![参考图片](http://netpi.github.io/resource/images/weather01.png)
### 2 回复历史上的今天
```
wt.history(function (err,data) {
if(err){
throw err;
}else{
console.log(data);
}
})
```
#### console.log(data); 结果如下图
![参考图片](http://netpi.github.io/resource/images/history01.png)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc