18 lines
298 B
Python
18 lines
298 B
Python
from flask import *
|
|
|
|
app = Flask(__name__)
|
|
|
|
TWEETFILE = "tweets.txt"
|
|
USERFILE = "users.txt"
|
|
def get_tweets():
|
|
with open(TWEETFILE) as f:
|
|
return "\n".split(f.read())
|
|
|
|
@app.route("/")
|
|
def index():
|
|
return "wewlad"
|
|
|
|
@app.route("/api/plain/tweets")
|
|
def tweets_get():
|
|
return "\n".join(get_tweets())
|