Micro-letter This thing estimated that otaku few unfamiliar, micro-letter after so many years of development finally to the open platform to make a friendly step. Egg pain thought the micro-letter will be a detailed API and other interfaces, excited to apply for the micro-trust platform, and then start looking for a variety of API location ...
Spent nearly one hours, still not found ...
Finally, the use of Google's big kill device, finally found such a link. I have a go, there is no more simple API documentation.
The most incomprehensible is that there is no local development environment support, every time to put in the production environment to debug.
The most gratifying is: the two methods, production environment debugging several times will be finished.
The Python (bottle) version of the code is as follows:
#-*-Coding:utf-8-*-from bottle import Debug, Default_app, run, get, request, post import sys, OS, time, Libxml2dom @get ('/') def index (): Return request. Get.get (' Echostr ') @post ('/') def index_post (): For key, value in request. Post.allitems (): doc = libxml2dom.parsestring (key) _to = Doc.xpath ('//fromusername ') [0].textcontent _from =
Doc.xpath ('//tousername ') [0].textcontent #_content = Doc.xpath ('//content ') [0].textcontent return] "" <xml> <tousername><! [cdata[%s]]></tousername> <fromusername><! [cdata[%s]]></fromusername> <CreateTime>%s</CreateTime> <msgtype><! [cdata[text]]></msgtype> <content><! [cdata[%s]]></content> <FuncFlag>0</FuncFlag> </xml> "" "% (_to, _from, int (Time.time ()), U ' I got a Go ') if __name__ = = "__main__": # Interactive Mode Debug (True) port = Int (sys.argv[1] If Len (SYS.ARGV) > 1 else 8888) run (host= ' 0.0.0.0 ')Port=port, Reloader=true) Else: # Mod WSGI Launch Os.chdir (Os.path.dirname (__file__)) app = Default_app ()
Demo direct look at the picture: