Skip to content

UserPushNotificationRegistrationGetListRequest23

Bases: OCIRequest

Request a list of all of the push notification registrations for a user by either registration id or user id. The response is either UserPushNotificationRegistrationGetListResponse23 or ErrorResponse.

Attributes:

registration_id (Optional[str]):

user_id (Optional[str]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class UserPushNotificationRegistrationGetListRequest23(OCIRequest):
    """Request a list of all of the push notification registrations for a user by
        either registration id or user id.
        The response is either UserPushNotificationRegistrationGetListResponse23 or ErrorResponse.

    Attributes:

        registration_id (Optional[str]):

        user_id (Optional[str]):

    """

    registration_id: Optional[str] = field(
        default=None, metadata={"alias": "registrationId"}
    )

    user_id: Optional[str] = field(default=None, metadata={"alias": "userId"})

Responses

Bases: OCIDataResponse

Response to UserPushNotificationRegistrationGetListRequest23.

A registration has more than one row in the response when the registration includes more than one token
and/or one or more event.  There can be one more tokens per registration ID and there can be one or more
events per token.

Registration Date uses the format "yyyy-MM-dd'T'HH:mm:ss.SSSZ" in the time zone of the requested user.
Example: 2010-10-01T09:30:00:000-0400.

Attributes:

user_id (str):

push_notification_registration_data (Optional[List[PushNotificationRegistrationData23]]):
Source code in src/mercury_ocip/commands/commands.py
@dataclass(kw_only=True)
class UserPushNotificationRegistrationGetListResponse23(OCIDataResponse):
    """Response to UserPushNotificationRegistrationGetListRequest23.

        A registration has more than one row in the response when the registration includes more than one token
        and/or one or more event.  There can be one more tokens per registration ID and there can be one or more
        events per token.

        Registration Date uses the format \"yyyy-MM-dd'T'HH:mm:ss.SSSZ\" in the time zone of the requested user.
        Example: 2010-10-01T09:30:00:000-0400.

    Attributes:

        user_id (str):

        push_notification_registration_data (Optional[List[PushNotificationRegistrationData23]]):

    """

    user_id: str = field(metadata={"alias": "userId"})

    push_notification_registration_data: Optional[
        List[PushNotificationRegistrationData23]
    ] = field(default=None, metadata={"alias": "pushNotificationRegistrationData"})

Bases: OCIResponse

Source code in src/mercury_ocip/commands/base_command.py
class ErrorResponse(OCIResponse):
    errorCode: Optional[int] = None
    summary: str
    summaryEnglish: str
    detail: Optional[str] = None

Example Usage

from mercury_ocip.client import Client
from mercury_ocip.commands import UserPushNotificationRegistrationGetListRequest23

client = Client()

command = UserPushNotificationRegistrationGetListRequest23(
    registration_id=...,
    user_id=...,
)

response = client.command(command)

print(response)

Example 2 with Raw Command

from mercury_ocip.client import Client

client = Client()

response = client.raw_command("UserPushNotificationRegistrationGetListRequest23",
    registration_id=...,
    user_id=...,
)

print(response)