mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 19:03:30 -05:00
21 lines
709 B
Python
21 lines
709 B
Python
from app.notify_client import NotifyAdminAPIClient, _attach_current_user
|
|
|
|
|
|
class ProviderClient(NotifyAdminAPIClient):
|
|
def get_all_providers(self):
|
|
return self.get(url="/provider-details")
|
|
|
|
def get_provider_by_id(self, provider_id):
|
|
return self.get(url="/provider-details/{}".format(provider_id))
|
|
|
|
def get_provider_versions(self, provider_id):
|
|
return self.get(url="/provider-details/{}/versions".format(provider_id))
|
|
|
|
def update_provider(self, provider_id, priority):
|
|
data = {"priority": priority}
|
|
data = _attach_current_user(data)
|
|
return self.post(url="/provider-details/{}".format(provider_id), data=data)
|
|
|
|
|
|
provider_client = ProviderClient()
|