Skip to content

Instantly share code, notes, and snippets.

@kybernetyk
Created January 31, 2011 21:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kybernetyk/804875 to your computer and use it in GitHub Desktop.
lol simple webzeug
#!/usr/bin/env python
import os
import json
news_items_fmunch = [
{ "text" : "How to play fruit munch ...", "link" : "http://www.minyxgames.com/promos/fmunch_howtoplay.html" },
{"text" : "Welcome to fruit munch!"},
{"text" : "Get the game for free. Read how ...", "link" : "http://www.minyxgames.com/promos/free_fmunch.html"},
{"text" : "New feature: The Full Game!", "link" : "minyxstore://com.minyxgames.fruitmunch.1"},
{"text" : "Unlock the game for free. Read more ...", "link" : "http://www.minyxgames.com/promos/free_fmunch.html"},
{"text" : "Hurrenson!", "link" : "http://www.minyxgames.com"},
{"text" : "Alte news!"}];
news_items_mfu = [{'text' : 'Ficken!', 'link' : 'http://www.minyxgames.com'}];
news_items_marble_star = [{ 'text': 'Welcome to Marble Star!' }];
news_items_marble_star_free = [ { 'text' : 'Buy full game. gief moneyz!', 'link' : 'http://www.minyxgames.com/promos/marble_star.html' } ];
news_items_marble_mayhem = [ { 'text':'Welcome to Marble Mayhem!' } ];
news_items = {'com.minyxgames.fruitmunch' : news_items_fmunch,
'com.minyxgames.megafillup' : news_items_mfu,
'com.minyxgames.marblestar' : news_items_marble_star,
'com.minyxgames.marblestarfree' : news_items_marble_star_free,
'com.minyxgames.marblemayhem' : news_items_marble_mayhem};
def dump (req, **params):
#req.write ("<pre>\n");
req.write ("params: %s\n\n---\n" %(str(params)));
for key in params:
req.write ("key: %s\n" % ( key));
req.write ("val: %s\n" % (params[key]));
req.write ("---\n");
#req.write("</pre>");
return
def news (req, **params):
appid = params['appid'];
news_item = news_items[appid];
jstring = json.dumps(news_item)
req.write(jstring)
def index (req):
req.write("Minyx App News Service Version 666");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment