Exemplo n.º 1
0
def initialize_app(flask_app):
    configure_app(flask_app)
    blueprint = Blueprint('api', __name__, url_prefix='/swagger-ui.html')
    api.init_app(blueprint)
    api.add_namespace(e_user_namespace)
    api.add_namespace(poster_namespace)
    flask_app.register_blueprint(blueprint)
Exemplo n.º 2
0
def create_blueprint():
    api.init_app(blueprint)
    api.add_resource(PostRequest, '/create')
    api.add_resource(HotRequest, '/hot')
    api.add_resource(CommentsRequest, '/comments')
    api.add_resource(DeletePostRequest, '/delete')
    api.add_resource(AnonActionRequest, '/anon')
    api.add_resource(SearchPostsRequest, '/search')
Exemplo n.º 3
0
def create_blueprint():
    api.init_app(blueprint)
    api.add_resource(AddNicknameRequest, '/nickname')
    api.add_resource(SearchUserRequest,  '/search')
    api.add_resource(UserGroupsRequest,  '/groups')
    api.add_resource(NewsFeedRequest,    '/newsfeed')
    api.add_resource(FetchUserRequest,   '/fetch')
    api.add_resource(AnonPostsRequest,   '/anons')
    api.add_resource(UpdateUserRequest,  '/update')
Exemplo n.º 4
0
from flask import Flask
from flask_migrate import Migrate

from db import db
from schema import schema
from restful import api

app = Flask(__name__)

app.config.from_envvar('APP_CONFIG_FILE')

migrate = Migrate(app, db)

if __name__ == '__main__':
    db.init_app(app)
    schema.init_app(app)
    api.init_app(app)
    app.run()
Exemplo n.º 5
0
def create_blueprint():
    api.init_app(blueprint)
    api.add_resource(LoginRequest, "/login")
Exemplo n.º 6
0
def create_blueprint():
    api.init_app(blueprint)
    api.add_resource(InviteRequest, 'create')
    api.add_resource(InviteFetchRequest, 'fetch')
    api.add_resource(InviteGetRequest, 'get')
Exemplo n.º 7
0
def create_blueprint():
    api.init_app(blueprint)
    api.add_resource(DeletesRequest, '/deletes')
    api.add_resource(ExploreRequest, '/explore')
    api.add_resource(AuthRequest, '/auth')
    api.add_resource(SearchGroupsAndUserRequest, '/search')