Skip to content

Latest commit

 

History

History
682 lines (455 loc) · 36.4 KB

File metadata and controls

682 lines (455 loc) · 36.4 KB

Messaging

Overview

Available Operations

create_messaging_channel

Create a channel

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.create_messaging_channel(request={
        "messaging_channel": {},
        "connection_id": "<id>",
    })

    assert res.messaging_channel is not None

    # Handle response
    print(res.messaging_channel)

Parameters

Parameter Type Required Description
request operations.CreateMessagingChannelRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.CreateMessagingChannelResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

create_messaging_message

Create a message

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.create_messaging_message(request={
        "messaging_message": {},
        "connection_id": "<id>",
    })

    assert res.messaging_message is not None

    # Handle response
    print(res.messaging_message)

Parameters

Parameter Type Required Description
request operations.CreateMessagingMessageRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.CreateMessagingMessageResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

get_messaging_channel

Retrieve a channel

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.get_messaging_channel(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_channel is not None

    # Handle response
    print(res.messaging_channel)

Parameters

Parameter Type Required Description
request operations.GetMessagingChannelRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetMessagingChannelResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

get_messaging_message

Retrieve a message

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.get_messaging_message(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_message is not None

    # Handle response
    print(res.messaging_message)

Parameters

Parameter Type Required Description
request operations.GetMessagingMessageRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetMessagingMessageResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

list_messaging_channels

List all channels

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.list_messaging_channels(request={
        "connection_id": "<id>",
    })

    assert res.messaging_channels is not None

    # Handle response
    print(res.messaging_channels)

Parameters

Parameter Type Required Description
request operations.ListMessagingChannelsRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.ListMessagingChannelsResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

list_messaging_messages

List all messages

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.list_messaging_messages(request={
        "connection_id": "<id>",
    })

    assert res.messaging_messages is not None

    # Handle response
    print(res.messaging_messages)

Parameters

Parameter Type Required Description
request operations.ListMessagingMessagesRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.ListMessagingMessagesResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

patch_messaging_channel

Update a channel

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.patch_messaging_channel(request={
        "messaging_channel": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_channel is not None

    # Handle response
    print(res.messaging_channel)

Parameters

Parameter Type Required Description
request operations.PatchMessagingChannelRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.PatchMessagingChannelResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

patch_messaging_event

Update an event

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.patch_messaging_event(request={
        "messaging_event": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_event is not None

    # Handle response
    print(res.messaging_event)

Parameters

Parameter Type Required Description
request operations.PatchMessagingEventRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.PatchMessagingEventResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

patch_messaging_message

Update a message

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.patch_messaging_message(request={
        "messaging_message": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_message is not None

    # Handle response
    print(res.messaging_message)

Parameters

Parameter Type Required Description
request operations.PatchMessagingMessageRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.PatchMessagingMessageResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

remove_messaging_channel

Remove a channel

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.remove_messaging_channel(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
request operations.RemoveMessagingChannelRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.RemoveMessagingChannelResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

remove_messaging_message

Remove a message

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.remove_messaging_message(request={
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
request operations.RemoveMessagingMessageRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.RemoveMessagingMessageResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

update_messaging_channel

Update a channel

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.update_messaging_channel(request={
        "messaging_channel": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_channel is not None

    # Handle response
    print(res.messaging_channel)

Parameters

Parameter Type Required Description
request operations.UpdateMessagingChannelRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.UpdateMessagingChannelResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

update_messaging_event

Update an event

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.update_messaging_event(request={
        "messaging_event": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_event is not None

    # Handle response
    print(res.messaging_event)

Parameters

Parameter Type Required Description
request operations.UpdateMessagingEventRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.UpdateMessagingEventResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*

update_messaging_message

Update a message

Example Usage

from unified_python_sdk import UnifiedTo
from unified_python_sdk.models import shared


with UnifiedTo(
    security=shared.Security(
        jwt="<YOUR_API_KEY_HERE>",
    ),
) as unified_to:

    res = unified_to.messaging.update_messaging_message(request={
        "messaging_message": {},
        "connection_id": "<id>",
        "id": "<id>",
    })

    assert res.messaging_message is not None

    # Handle response
    print(res.messaging_message)

Parameters

Parameter Type Required Description
request operations.UpdateMessagingMessageRequest ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.UpdateMessagingMessageResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*