Update all dates to use utc, only in the template is it converted to british time.

Template versions and template version pages added.

Fix merge changes.
This commit is contained in:
Nicholas Staples
2016-05-11 11:20:45 +01:00
committed by Chris Hill-Scott
parent daf33b03ad
commit 64e7a7b010
12 changed files with 283 additions and 13 deletions

View File

@@ -126,13 +126,25 @@ class ServiceAPIClient(NotificationsAPIClient):
endpoint = "/service/{0}/template/{1}".format(service_id, id_)
return self.post(endpoint, data)
def get_service_template(self, service_id, template_id, *params):
def get_service_template(self, service_id, template_id, version=None, *params):
"""
Retrieve a service template.
"""
endpoint = '/service/{service_id}/template/{template_id}'.format(
service_id=service_id,
template_id=template_id)
if version:
endpoint = '{base}/version/{version}'.format(base=endpoint, version=version)
return self.get(endpoint, *params)
def get_service_template_versions(self, service_id, template_id, *params):
"""
Retrieve a list of versions for a template
"""
endpoint = '/service/{service_id}/template/{template_id}/version'.format(
service_id=service_id,
template_id=template_id
)
return self.get(endpoint, *params)
def get_service_templates(self, service_id, *params):