aboutsummaryrefslogtreecommitdiffstats
path: root/src/loggergae/api.py
blob: 9505fcf881ff6cfa475e61248d8169cd9c1bda6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import cgi
import datetime
import webapp2

from google.appengine.ext import db

class Feed(db.Model):
	secret = db.StringProperty()
	content = db.StringProperty(multiline=True)
	date = db.DateTimeProperty(auto_now_add=True)
	
class MainPage(webapp2.RequestHandler):
	def get(self):
		self.response.out.write('main page')

class Stream(webapp2.RequestHandler):
	def get(self):
		self.response.out.write('stream get')
	def post(self):
		self.response.out.write('stream post')

app = webapp2.WSGIApplication([
	('/api', MainPage),
	('/api/get', Stream),
	('/api/set', Stream),
	('/', MainPage)
], debug=True)