mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 16:11:11 -04:00
Remove splatting on get template methods
This `*params` argument seems to be copy/pasted boilerplate. It’s not used by any consumers of this client, and makes it harder to write a decorator for this function.
This commit is contained in:
@@ -199,7 +199,7 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
data
|
||||
)
|
||||
|
||||
def get_service_template(self, service_id, template_id, version=None, *params):
|
||||
def get_service_template(self, service_id, template_id, version=None):
|
||||
"""
|
||||
Retrieve a service template.
|
||||
"""
|
||||
@@ -208,9 +208,9 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
template_id=template_id)
|
||||
if version:
|
||||
endpoint = '{base}/version/{version}'.format(base=endpoint, version=version)
|
||||
return self.get(endpoint, *params)
|
||||
return self.get(endpoint)
|
||||
|
||||
def get_service_template_versions(self, service_id, template_id, *params):
|
||||
def get_service_template_versions(self, service_id, template_id):
|
||||
"""
|
||||
Retrieve a list of versions for a template
|
||||
"""
|
||||
@@ -218,15 +218,15 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
service_id=service_id,
|
||||
template_id=template_id
|
||||
)
|
||||
return self.get(endpoint, *params)
|
||||
return self.get(endpoint)
|
||||
|
||||
def get_service_templates(self, service_id, *params):
|
||||
def get_service_templates(self, service_id):
|
||||
"""
|
||||
Retrieve all templates for service.
|
||||
"""
|
||||
endpoint = '/service/{service_id}/template'.format(
|
||||
service_id=service_id)
|
||||
return self.get(endpoint, *params)
|
||||
return self.get(endpoint)
|
||||
|
||||
def count_service_templates(self, service_id, template_type=None):
|
||||
return len([
|
||||
|
||||
Reference in New Issue
Block a user