Beispiel #1
0
    def __init__(self, *args, **kwargs):
        super(App, self).__init__(*args, **kwargs)
        LOG.info('API Server is starting')

        self.add_route('/', base.BaseResource())
        self.add_route('/v1/users', users.Collection())
        self.add_route('/v1/users/{id}', users.Item())
        self.add_route('/v1/countries', countries.Collection())
        self.add_route('/v1/countries/{id}', countries.Item())
        self.add_route('/v1/provinces', provinces.Collection())
        self.add_route('/v1/provinces/{id}', provinces.Item())
        self.add_route('/v1/cities', cities.Collection())
        self.add_route('/v1/cities/{id}', cities.Item())
        self.add_route('/v1/roles', roles.Collection())
        self.add_route('/v1/roles/{id}', roles.Item())
        self.add_route('/v1/vendors', vendors.Collection())
        self.add_route('/v1/vendors/{id}', vendors.Item())
        self.add_route('/v1/devices', devices.Collection())
        self.add_route('/v1/devices/{id}', devices.Item())
        self.add_route('/v1/product_types', product_types.Collection())
        self.add_route('/v1/product_types/{id}', product_types.Item())
        self.add_route('/v1/products', products.Collection())
        self.add_route('/v1/products/{id}', products.Item())
        self.add_route('/v1/transaction_types', transaction_types.Collection())
        self.add_route('/v1/transaction_types/{id}', transaction_types.Item())
        self.add_route('/v1/users/self/login', users.Self())

        self.add_error_handler(AppError, AppError.handle)
    def __init__(self, *args, **kwargs):
        super(API, self).__init__(*args, **kwargs)

        self.add_route('/', base.BaseResource())
        self.add_route('/v1/users', users.Collection())
        self.add_route('/v1/users/{user_id}', users.Item())
        self.add_route('/v1/users/self/login', users.Self())

        self.add_error_handler(AppError, AppError.handle)
Beispiel #3
0
    def __init__(self, *args, **kwargs):
        super(App, self).__init__(*args, **kwargs)
        LOG.info("API Server is starting")

        self.add_route("/", base.BaseResource())
        self.add_route("/api/v1/users", users.Collection())
        self.add_route("/api/v1/user/sign_in", users.Self())
        self.add_route("/api/v1/metrics", metrics.Collection())

        self.add_error_handler(AppError, AppError.handle)
Beispiel #4
0
    def __init__(self, *args, **kwargs):
        super(App, self).__init__(*args, **kwargs)
        LOG.info("API Server is starting")

        self.add_route("/", base.BaseResource())
        self.add_route("/v1/users", users.Collection())
        self.add_route("/v1/users/{user_id}", users.Item())
        self.add_route("/v1/users/self/login", users.Self())

        self.add_error_handler(AppError, AppError.handle)
    def __init__(self, *args, **kwargs):
        super(App, self).__init__(*args, **kwargs)
        LOG.info('API Server is starting')

        self.add_route('/', base.BaseResource())
        self.add_route('/v1/users', users.Collection())
        self.add_route('/v1/users/{user_id}', users.Item())
        self.add_route('/v1/users/self/login', users.Self())
        self.add_route('/v1/examples', examples.ExampleResource())

        self.add_error_handler(AppError, AppError.handle)
Beispiel #6
0
    def __init__(self, *args, **kwargs):
        super(App, self).__init__(*args, **kwargs)
        LOG.info("API Server is starting")

        self.add_route("/", base.BaseResource())
        self.add_route("/v1/users", users.Collection())
        self.add_route("/v1/users/{user_id}", users.Item())
        self.add_route("/v1/users/self/login", users.Self())
        self.add_route("/users", users.GetUsers())
        self.add_route("/api/companies", company.CompanyCollection())
        self.add_route("/api/company_create", company.CompanyCreate())  # 
        self.add_route("/api/company/{id}", company.CompanyCollect())
        self.add_route("/api/company_update/{id}", company.CompanyUpdate())
        self.add_route("/api/company_destroy/{id}", company.CompanyDelete())
        self.add_route("/api/companies_search", company.CompanyFilter())

        self.add_error_handler(AppError, AppError.handle)