mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 01:23:11 -04:00
Add limit_days query param to the get_job endpoint.
This commit is contained in:
@@ -14,11 +14,14 @@ class JobApiClient(BaseAPIClient):
|
|||||||
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
|
self.client_id = app.config['ADMIN_CLIENT_USER_NAME']
|
||||||
self.secret = app.config['ADMIN_CLIENT_SECRET']
|
self.secret = app.config['ADMIN_CLIENT_SECRET']
|
||||||
|
|
||||||
def get_job(self, service_id, job_id=None):
|
def get_job(self, service_id, job_id=None, limit_days=None):
|
||||||
if job_id:
|
if job_id:
|
||||||
return self.get(url='/service/{}/job/{}'.format(service_id, job_id))
|
return self.get(url='/service/{}/job/{}'.format(service_id, job_id))
|
||||||
|
params = {}
|
||||||
|
if limit_days is not None:
|
||||||
|
params['limit_days'] = limit_days
|
||||||
else:
|
else:
|
||||||
return self.get(url='/service/{}/job'.format(service_id))
|
return self.get(url='/service/{}/job'.format(service_id), params=params)
|
||||||
|
|
||||||
def create_job(self, job_id, service_id, template_id, original_file_name, notification_count):
|
def create_job(self, job_id, service_id, template_id, original_file_name, notification_count):
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user