Exemple #1
0
    def put(self, data):
        """Create a new notification way.

        :param data: a notification way within the request body.
        """
        handler = notificationway_handler.NotificationWayHandler(pecan.request)
        handler.create(data)
Exemple #2
0
 def get(self):
     """Returns a specific notification way."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     notificationway = handler.get({"notificationway_name": self._id})
     return notificationway
Exemple #3
0
 def put(self, notificationway):
     """Update a specific notification way."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     handler.update({"notificationway_name": self._id}, notificationway)
Exemple #4
0
 def delete(self):
     """Returns a specific notification way."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     handler.delete({"notificationway_name": self._id})
Exemple #5
0
 def post(self, data):
     """Returns all notification ways."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     notificationsway = handler.get_all(data)
     return notificationsway
 def get_one(self, notificationway_name):
     """Returns a specific notification way."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     notificationway = handler.get(notificationway_name)
     return notificationway