Пример #1
0
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.apm import Apm
from services.service_base import servicebase

apiamp = Blueprint('amp', 'amp')
routeapi = '/consulta'
service = servicebase(Apm)
controllerapi = controllerbase(Apm, service)


@apiamp.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()


@apiamp.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()


@apiamp.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)


@apiamp.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)
Пример #2
0
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.pagos import Pagos
from services.service_base import servicebase;

apipagos = Blueprint('pagos', 'pagos')
routeapi = '/pagos'
service = servicebase(Pagos)
controllerapi = controllerbase(Pagos, service)
@apipagos.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()

@apipagos.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()

@apipagos.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)

@apipagos.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)

@apipagos.errorhandler(HTTPException)
def handle_exception(e):
    return controllerapi.handle_exception(e)
Пример #3
0
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.pacienteobrasocial import PacienteObraSocial
from services.service_base import servicebase;

apipacienteObraSocial = Blueprint('pacienteObraSocial', 'pacienteObraSocial')
routeapi = '/pacienteObraSocial'
service = servicebase(PacienteObraSocial)
controllerapi = controllerbase(PacienteObraSocial, service)
@apipacienteObraSocial.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()

@apipacienteObraSocial.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()

@apipacienteObraSocial.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)

@apipacienteObraSocial.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)

@apipacienteObraSocial.errorhandler(HTTPException)
def handle_exception(e):
    return controllerapi.handle_exception(e)
Пример #4
0
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.persona import Persona
from services.service_base import servicebase

apipersona = Blueprint('persona', 'persona')
routeapi = '/persona'
service = servicebase(Persona)
controllerapi = controllerbase(Persona, service)


@apipersona.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()


@apipersona.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()


@apipersona.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)


@apipersona.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.usuarios import Usuarios
from services.service_base import servicebase;

apiusuarios = Blueprint('usuarios', 'usuarios')
routeapi = '/usuarios'
service = servicebase(Usuarios)
controllerapi = controllerbase(Usuarios, service)
@apiusuarios.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()

@apiusuarios.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()

@apiusuarios.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)

@apiusuarios.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)

@apiusuarios.errorhandler(HTTPException)
def handle_exception(e):
    return controllerapi.handle_exception(e)
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.obrasocial import ObraSocial
from services.service_base import servicebase;

apiobrasocial = Blueprint('obrasocial', 'obrasocial')
routeapi = '/obrasocial'
service = servicebase(ObraSocial)
controllerapi = controllerbase(ObraSocial, service)
@apiobrasocial.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()

@apiobrasocial.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()

@apiobrasocial.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)

@apiobrasocial.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)

@apiobrasocial.errorhandler(HTTPException)
def handle_exception(e):
    return controllerapi.handle_exception(e)
Пример #7
0
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.gestionturnos import GestionTurnos
from services.service_base import servicebase

apigestionTurnos = Blueprint('gestionTurnos', 'gestionTurnos')
routeapi = '/gestionTurnos'
service = servicebase(GestionTurnos)
controllerapi = controllerbase(GestionTurnos, service)


@apigestionTurnos.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()


@apigestionTurnos.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()


@apigestionTurnos.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)


@apigestionTurnos.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)
from controllers.controller_base import controllerbase
from flask import Blueprint
from werkzeug.exceptions import HTTPException
from domain.consulta import Consulta
from services.service_base import servicebase

apiconsulta = Blueprint('consulta', 'consulta')
routeapi = '/consulta'
service = servicebase(Consulta)
controllerapi = controllerbase(Consulta, service)


@apiconsulta.route(routeapi, methods=['GET'])
def api_get():
    return controllerapi.api_get()


@apiconsulta.route(routeapi, methods=['POST'])
def api_post():
    return controllerapi.api_post()


@apiconsulta.route(routeapi + '/<string:id>', methods=['PUT'])
def api_put(id):
    return controllerapi.api_put(id)


@apiconsulta.route(routeapi + '/<string:id>', methods=['DELETE'])
def api_delete(id):
    return controllerapi.api_delete(id)