Skip to content

Commit

Permalink
api documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkay committed Sep 20, 2009
1 parent f570d48 commit 398f125
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/api.py
@@ -1,9 +1,17 @@
import os

from google.appengine.ext import webapp
from google.appengine.ext.webapp import template

from tools import hilite_me, update_styles

class ApiHandler(webapp.RequestHandler):
def get(self):
path = os.path.join(os.path.dirname(__file__), 'templates/api.txt')
self.response.headers.add_header("Content-Type", "text/plain")
self.response.out.write(template.render(path, {}))

def post(self):
code = self.request.get('code')
lexer = self.request.get('lexer')
style = self.request.get('style')
Expand Down
2 changes: 1 addition & 1 deletion src/templates/index.html
Expand Up @@ -118,7 +118,7 @@
</div>
<div id="footer">
<p>
Made by <a href="http://versia.com">Alexander Kojevnikov</a>. Powered by <a href="http://code.google.com/appengine/">Google App Engine</a> and <a href="http://pygments.org/">Pygments</a>.
Made by <a href="http://versia.com">Alexander Kojevnikov</a> &bull; <a href="/api">API</a> &bull; Powered by <a href="http://code.google.com/appengine/">Google App Engine</a> and <a href="http://pygments.org/">Pygments</a>
</p>
</div>
</div>
Expand Down

0 comments on commit 398f125

Please sign in to comment.