Пример #1
0
    def put(self, data):
        """Create a new macro modulation object.

        :param data: a macro modulation within the request body.
        """
        handler = macromodulation_handler.MacroModulationHandler(pecan.request)
        handler.create(data)
Пример #2
0
 def get(self):
     """Returns a specific macro modulation."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     modulation = handler.get({"macromodulation_name": self._id})
     return modulation
Пример #3
0
 def put(self, modulation):
     """Update a specific macro modulation."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     handler.update({"macromodulation_name": self._id}, modulation)
Пример #4
0
 def delete(self):
     """Returns a specific macro modulation."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     handler.delete({"macromodulation_name": self._id})
Пример #5
0
 def post(self, data):
     """Returns all macro modulation objects."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     modulations = handler.get_all(data)
     return modulations
Пример #6
0
 def get_one(self, timeperiod_name):
     """Returns a specific macro modulation."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     modulation = handler.get(timeperiod_name)
     return modulation