mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 00:20:43 -04:00
Merge pull request #88 from alphagov/integrate_template_api
Mapped template actions to the api and mocked tests.
This commit is contained in:
@@ -83,6 +83,20 @@ class NotificationsAdminAPIClient(NotificationsAPIClient):
|
||||
endpoint = "/service/{0}/template".format(service_id)
|
||||
return self.post(endpoint, data)
|
||||
|
||||
def update_service_template(self, id_, name, type_, content, service_id):
|
||||
"""
|
||||
Update a service template.
|
||||
"""
|
||||
data = {
|
||||
'id': id_,
|
||||
'name': name,
|
||||
'template_type': type_,
|
||||
'content': content,
|
||||
'service': service_id
|
||||
}
|
||||
endpoint = "/service/{0}/template/{1}".format(service_id, id_)
|
||||
return self.put(endpoint, data)
|
||||
|
||||
def get_service_template(self, service_id, template_id, *params):
|
||||
"""
|
||||
Retrieve a service template.
|
||||
|
||||
Reference in New Issue
Block a user