Ejemplo n.º 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)
Ejemplo n.º 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
Ejemplo n.º 3
0
 def put(self, modulation):
     """Update a specific macro modulation."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     handler.update({"macromodulation_name": self._id}, modulation)
Ejemplo n.º 4
0
 def delete(self):
     """Returns a specific macro modulation."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     handler.delete({"macromodulation_name": self._id})
Ejemplo n.º 5
0
 def post(self, data):
     """Returns all macro modulation objects."""
     handler = macromodulation_handler.MacroModulationHandler(pecan.request)
     modulations = handler.get_all(data)
     return modulations
Ejemplo n.º 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