'Tries to make a API.md to simplify the api docs.'

def _api_make_md(self):

    head = '#    API    Reference\n\nThe    API    is    still    pretty    new    and    needs    some    serious    cleaning    up    on    the    backend    but    should    be    reasonably    functional.    There    are    no    error    codes    yet.\n\n##    General    structure\nThe    API    endpoint    is    `http://ip:port    +    HTTP_ROOT    +    /api/v2?apikey=$apikey&cmd=$command`\n\nResponse    example    (default    `json`)\n```\n{\n                "response":    {\n                                "data":    [\n                                                {\n                                                                "loglevel":    "INFO",\n                                                                "msg":    "Signal    2    caught,    saving    and    exiting...",\n                                                                "thread":    "MainThread",\n                                                                "time":    "22-sep-2015    01:42:56    "\n                                                }\n                                ],\n                                "message":    null,\n                                "result":    "success"\n                }\n}\n```\n```\nGeneral    optional    parameters:\n\n                out_type:            "json"    or    "xml"\n                callback:            "pong"\n                debug:                        1\n```\n\n##    API    methods'
    body = ''
    doc = self._api_docs(md=True)
    for k in sorted(doc):
        v = doc.get(k)
        body += ('###    %s\n' % k)
        body += ('' if (not v) else (v + '\n'))
        body += '\n\n'
    result = ((head + '\n\n') + body)
    return (('<pre>' + result) + '</pre>')
