-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsonapp.py
43 lines (38 loc) · 1.44 KB
/
jsonapp.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import webapp2
from mfb.jsonhandlers import *
config = {
'webapp2_extras.auth': {
'user_model': 'mfb.models.User',
'user_attributes': ['auth_ids', 'admin'],
},
'webapp2_extras.sessions': {
'secret_key': 'THISKEYISSUCHASECRET',
}
}
app = webapp2.WSGIApplication([
('/json/items', GetItems),
('/json/restaurants', GetRestaurants),
('/json/getrestaurants', GetRestaurantsGoogle),
('/json/getmenu', GetMenu), #restaurantid
('/json/getitem', GetItem), #
('/json/profile', GetProfile),
('/json/getitemsuggestions', GetItemSuggestions),
('/json/getrestaurantsuggestions', GetRestaurantSuggestions),
('/json/getrestaurantid', GetRestaurantId),
('/json/getprompt', GetPrompt),
('/json/getprofile', GetProfile),
('/json/reviewitem', ReviewItem), #userid, authtoken, itemid, rating, description
('/json/getitemreviews', GetItemReviews),
('/json/createrestaurant', CreateRestaurant),
('/json/createitem', CreateItem),
('/json/list', ListHandler), #create/delete, (un)follow, add/remove item
('/json/getfeed', GetFeed),
('/json/loadmorefeed', LoadMoreFeed),
('/json/followuser', FollowUser),
('/json/unfollowuser', UnFollowUser),
('/json/signup', Signup),
('/json/login', Login),
('/json/logout', Logout),
('/json/', Test),
('/json', Test),
], debug=True, config=config)