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