Esempio n. 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)
Esempio n. 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
Esempio n. 3
0
 def put(self, notificationway):
     """Update a specific notification way."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     handler.update({"notificationway_name": self._id}, notificationway)
Esempio n. 4
0
 def delete(self):
     """Returns a specific notification way."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     handler.delete({"notificationway_name": self._id})
Esempio n. 5
0
 def post(self, data):
     """Returns all notification ways."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     notificationsway = handler.get_all(data)
     return notificationsway
Esempio n. 6
0
 def get_one(self, notificationway_name):
     """Returns a specific notification way."""
     handler = notificationway_handler.NotificationWayHandler(pecan.request)
     notificationway = handler.get(notificationway_name)
     return notificationway