Esempio n. 1
0
    def post(self, data):
        """Create a new contact group.

        :param data: a contact group within the request body.
        """
        handler = contactgroup_handler.ContactGroupHandler(pecan.request)
        handler.create(data)
Esempio n. 2
0
 def put(self, group_name, contactgroup):
     """Update a specific contact group."""
     handler = contactgroup_handler.ContactGroupHandler(pecan.request)
     handler.update(group_name, contactgroup)
Esempio n. 3
0
 def delete(self, group_name):
     """Delete a specific contact group."""
     handler = contactgroup_handler.ContactGroupHandler(pecan.request)
     handler.delete(group_name)
Esempio n. 4
0
 def get_one(self, group_name):
     """Returns a contact group."""
     handler = contactgroup_handler.ContactGroupHandler(pecan.request)
     contactgroup = handler.get(group_name)
     return contactgroup
Esempio n. 5
0
 def get_all(self):
     """Returns all contact groups."""
     handler = contactgroup_handler.ContactGroupHandler(pecan.request)
     contact_groups = handler.get_all()
     return contact_groups
Esempio n. 6
0
 def get(self):
     """Returns a contact group."""
     handler = contactgroup_handler.ContactGroupHandler(pecan.request)
     contactgroup = handler.get({"contactgroup_name": self._id})
     return contactgroup
Esempio n. 7
0
 def delete(self):
     """Delete a specific contact group."""
     handler = contactgroup_handler.ContactGroupHandler(pecan.request)
     handler.delete({"contactgroup_name": self._id})
Esempio n. 8
0
 def post(self, data):
     """Returns all contact groups."""
     handler = contactgroup_handler.ContactGroupHandler(pecan.request)
     contact_groups = handler.get_all(data)
     return contact_groups