Code Monkey home page Code Monkey logo

wechatalarm's Introduction

WeChatAlarm

alarm 是已经编译好的文件可直接运行

这是一个用来做微信报警的应用

示例 Alt text

  • 首先更改配置文件(config.toml)中的APPID和SECRET然后运行脚本
./alarm
服务器已启动监听端口为:9200
  • 第二步 注意config中的模板ID配置完后要将相应的模板配置写入到template.json中
//添加模板ID的json配置在template.json中
//例如
{
   "对应模板id": {
     "first": {
       "value": "",
       "color": "#173177"
     },
     "remark": {
       "value": "点击查看详情!",
       "color": "#173177"
     }
   }
}
  • 第三步 发送post请求
#多个user使用,号分隔
curl -d'{"user":"xiaowang,xiaozhang","message":{"first":"aaaaa","remark":"remark"},"template_key":"test","url":"www.baidu.com"}' 127.0.0.1:9200
#这时候刚才启动的服务器就会发出请求

POST请求:创建成功 {"access_token":"token","expires_in":7200}
当前Token为: token
过期时间还有:7200秒
POST请求:创建成功 {"errcode":0,"errmsg":"ok","msgid":22212}

wechatalarm's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.