# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml.

from flask import Blueprint
from . import handlers

from . import oauth2_itsyouonline as oauth2_itsyouonline


users_api = Blueprint('users_api', __name__)


@users_api.route('/users', methods=['GET'])
@oauth2_itsyouonline.oauth2_itsyouonline([])
def users_get():
    """
    Get list of all developers
    It is handler for GET /users
    """
    return handlers.users_getHandler()


@users_api.route('/users', methods=['POST'])
@oauth2_itsyouonline.oauth2_itsyouonline(["user:memberof:goraml-admin"])
def users_post():
    """
    Add user
    It is handler for POST /users
    """
    return handlers.users_postHandler()


@users_api.route('/users/<username>', methods=['GET'])
@oauth2_itsyouonline.oauth2_itsyouonline(["user:memberof:goraml"])
def users_byUsername_get(username):
    """
    Get information on a specific user
    It is handler for GET /users/<username>
    """
    return handlers.users_byUsername_getHandler(username)
