Giter Site home page Giter Site logo

wxalarm's Introduction

wxAlarm

本项目是在Django的基础下,搭一个简易服务器,用来接收http请求,目前支持GET和POST请求

说明: 本项目主要是通过http请求然后向指定微信群发送消息,至于是系统报警信息啥的都无所谓,只不过本人是拿来做系统报警用的

使用流程: 1、安装python编译环境(怎么安装自己百度,这里就不做介绍了) 2、下载好项目之后,使用pyCharm运行本项目,也可以直接在项目的目录下直接用cmd命令行(python manage.py runserver 127.0.0.1:8000)运行此项目 3、正常运行之后,首先登陆微信,先请求登陆链接:http://127.0.0.1:8000/alarm/login 4、这是弹出一张图片,然后用你的微信扫描登录就好 5、建立相应的系统微信报警群,并把该群保存至通讯录(这一步至关重要,不保存就无法查找到该群) 6、发送内容不能含有特殊字符,以免造成数据丢失。 7、一切准备就绪,请求发送链接:http://127.0.0.1:8000/alarm/sendMsg/?name=(微信群名)&context=(发送内容)【GET请求】 8、以上运行都是在本机运行,而如果想开放出去让别人也能调用,则需在第二步下,用cmd命令行(python manage.py runserver 0.0.0.0:8000)运行此项目,这样接受别人异地发送的请求。(注:操作前先把电脑的防火墙关闭)

POST请求:

Method:POST

dataType:json

Url: http://127.0.0.1:8000/alarm/sendMsgPost

输入参数:

字段名|变量名|必填|类型|示例|描述

微信群名|name|是|String|微信群名|群名要统一不能重复| 发送内容|context|是|String|xxx|发送内容不要包含一些特殊字符,不然可能造成数据丢失|

返回参数:

接受成功返回“OK”

输入示例: { "name":"微信群名", "context":"发送内容" }

wxalarm's People

Contributors

chenzhyang avatar

Watchers

James Cloos 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.