Skip to content

Latest commit

 

History

History
87 lines (56 loc) · 8.84 KB

File metadata and controls

87 lines (56 loc) · 8.84 KB

Translations.Groups

Overview

Available Operations

  • delete - Delete a translation group
  • retrieve - Retrieve a translation group

delete

Delete an entire translation group and all its translations

Example Usage

import novu_py
from novu_py import Novu


with Novu(
    secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

    novu.translations.groups.delete(resource_type=novu_py.PathParamResourceType.WORKFLOW, resource_id="welcome-email")

    # Use the SDK ...

Parameters

Parameter Type Required Description Example
resource_type models.PathParamResourceType ✔️ Resource type workflow
resource_id str ✔️ Resource ID welcome-email
idempotency_key Optional[str] A header for idempotency purposes
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Errors

Error Type Status Code Content Type
models.APIError 4XX, 5XX */*

retrieve

Retrieves a single translation group by resource type (workflow, layout) and resource ID (workflowId, layoutId)

Example Usage

import novu_py
from novu_py import Novu


with Novu(
    secret_key="YOUR_SECRET_KEY_HERE",
) as novu:

    res = novu.translations.groups.retrieve(resource_type=novu_py.TranslationControllerGetTranslationGroupEndpointPathParamResourceType.WORKFLOW, resource_id="welcome-email")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
resource_type models.TranslationControllerGetTranslationGroupEndpointPathParamResourceType ✔️ Resource type workflow
resource_id str ✔️ Resource ID welcome-email
idempotency_key Optional[str] A header for idempotency purposes
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.TranslationGroupDto

Errors

Error Type Status Code Content Type
models.APIError 4XX, 5XX */*