Add notification get command (#2818)

* Add new command

* lint
This commit is contained in:
Teo Voinea
2023-02-09 11:30:40 -05:00
committed by GitHub
parent a13bb2feb3
commit 2e6eef7654
2 changed files with 10 additions and 0 deletions

View File

@ -859,6 +859,15 @@ class Notifications(Endpoint):
data=requests.NotificationSearch(container=container),
)
def get(self, notification_id: UUID_EXPANSION) -> List[models.Notification]:
"""Get a notification"""
self.logger.debug("getting notification")
return self._req_model_list(
"GET",
models.Notification,
data=requests.NotificationSearch(notification_id=notification_id),
)
def migrate_jinja_to_scriban(
self, dry_run: bool = False
) -> Union[