Skip to content

User Notifications

get

List notifications or retrieve a single notification

Parameters:

Name Type Description Default
_id Optional[int]

manufacturer identifier

None
Source code in pyskroutz/resources/notifications.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@fluent
def get(self, _id: Optional[int] = None) -> None:
    """List notifications or retrieve a single notification

    Args:
        _id: manufacturer identifier
    """
    self._set_prepared_request(
        url=f"{self.BASE_URL}/{self.ENDPOINT_PATH}/{_id}"
        if _id is not None
        else f"{self.BASE_URL}/{self.ENDPOINT_PATH}",
        method="GET",
        model=notifications.NotificationRetrieve
        if _id is not None
        else notifications.NotificationList,
    )

Example

pyskroutz.manufacturers(client).get(314233664).execute()

mark_as_viewed

Mark notifications as viewed

Parameters:

Name Type Description Default
ids List[int]

Notification identifiers

required
Source code in pyskroutz/resources/notifications.py
33
34
35
36
37
38
39
40
41
42
43
44
45
@fluent
def mark_as_viewed(self, ids: List[int]) -> None:
    """Mark notifications as viewed

    Args:
        ids: Notification identifiers
    """
    self._set_prepared_request(
        url=f"{self.BASE_URL}/{self.ENDPOINT_PATH}/view",
        json={"ids": ids},
        method="POST",
        model=None,
    )

Example

pyskroutz.notifications(client).mark_as_viewed([314083116]).execute()

Response Models

Response models for notifications resources