コード例 #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