Здесь будет город-
хуй
struct mkd_renderer {
/* document level callbacks */
void (*prolog)(struct buf *ob, void *opaque);
void (*epilog)(struct buf *ob, void *opaque);
/* block level callbacks - NULL skips the block */
void (*blockcode)(struct buf *ob, struct buf *text, void *opaque);
void (*blockquote)(struct buf *ob, struct buf *text, void *opaque);
void (*blockhtml)(struct buf *ob, struct buf *text, void *opaque);
void (*header)(struct buf *ob, struct buf *text,
...
}
class ApiHandler(BnwWebHandler):
@defer.inlineCallbacks
def respond_post(self, cmd_name):
stime = time.time()
user = yield objs.User.find_one(
{'login_key': self.get_argument('login', '')})
if not cmd_name:
defer.returnValue(json.dumps(dict(
ok=True,
commands=api_handlers.handlers.keys())))
if cmd_name not in api_handlers.handlers:
defer.returnValue(json.dumps(dict(
ok=False,
desc='unknown command')))