Beispiel #1
0
    def get_one(self, id):
        """
            List RuleType objects by id.

            Handle:
                GET /ruletypes/1
        """
        ruletype_db = RuleTypesController.__get_by_id(id)
        ruletype_api = RuleTypeAPI.from_model(ruletype_db)
        return ruletype_api
Beispiel #2
0
    def get_one(self, id):
        """
            List RuleType objects by id.

            Handle:
                GET /ruletypes/1
        """
        ruletype_db = RuleTypesController.__get_by_id(id)
        ruletype_api = RuleTypeAPI.from_model(ruletype_db)
        return ruletype_api
Beispiel #3
0
    def get_all(self):
        """
            List all RuleType objects.

            Handles requests:
                GET /ruletypes/
        """
        ruletype_dbs = RuleType.get_all()
        ruletype_apis = [RuleTypeAPI.from_model(runnertype_db)
                         for runnertype_db in ruletype_dbs]
        return ruletype_apis
Beispiel #4
0
    def get_all(self):
        """
            List all RuleType objects.

            Handles requests:
                GET /ruletypes/
        """
        ruletype_dbs = RuleType.get_all()
        ruletype_apis = [RuleTypeAPI.from_model(runnertype_db)
                         for runnertype_db in ruletype_dbs]
        return ruletype_apis