def showPlayers(): coll = list(rwfb.openDB()["players"].find()) for m in rwfb.openDB()["mobs"].find(): coll.append(m) return Response(response=json_util.dumps(list(coll)), status=200, mimetype="application/json")
def main(): db = rwfb.openDB() #print(rwfb.getAll(db)) num = "845"#18007778888" print(rwfb.getTopTen(db)) rwfb.createPlayer(db, num, "LeslieLanderTheReprimander") rwfb.createPlayer(db, "111", "HartogTheWarthog") rwfb.createPlayer(db, "12", "LeiYuAndTheGreatKazoo")
def textHandling(): """Handling a text message.""" db = rwfb.openDB() if request.method == "GET": return "HI" elif request.method == "POST": num = request.values.get("From", None) msg = request.values.get("Body", None).lower() if rwfb.query(db, num): return handleAction(db, num, msg) else: rwfb.createPlayer(db, num, "worm") resp = twilio.twiml.Response() resp.message("You've created an account with {} " "under the name {}. Type '?' for a list of" "commands".format(num, "worm")) return str(resp)
def main(): db = rwfb.openDB() rwfb.createMonsters(db, NUM_MON)
def viewPlayer(number): db = rwfb.openDB() num = number # "18007778888" return rwfb.getStats(db, num)
def showLeaders(): players=rwfb.getTopTen(rwfb.openDB()) return render_template('leaderboard.html', players=players)
def createPlayer(number): db = rwfb.openDB() num = number # "18007778888" rwfb.createPlayer(db, num, "worm") return "Player Created"
def showPlayers2(): players=rwfb.getAll(rwfb.openDB()) return render_template('show_map.html', players=players)
def showPlayers(players = rwfb.getAll(rwfb.openDB())): #db = rwfb.openDB() #players = rwfb.getAll(db) return render_template('show_map.html', players=players)