Socket
Socket
Sign inDemoInstall

wechat-tools

Package Overview
Dependencies
8
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    wechat-tools

wechat 回复小工具 ,包括天气预报、历史今天等实用功能


Version published
Maintainers
1
Created

Readme

Source

wechat-tools 是微信公众平台开发者的实用小工具

安装

npm install wechat-tools -save;

使用

1 回复天气预报

此为共享 ak = uD67wmZzhi3RFcmTkGoks2Dr,实际应用时建议去百度开发者自行申请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); 结果如下图

参考图片

2 回复历史上的今天

wt.history(function (err,data) {
    if(err){
      throw err;
    }else{
      console.log(data);
    }
  })
console.log(data); 结果如下图

参考图片

Keywords

FAQs

Last updated on 12 Oct 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc