Skip to content

Commit a2a9295

Browse files
committed
feat: Add extra body params to CLI
1 parent b84cf19 commit a2a9295

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

deepl/__main__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# license that can be found in the LICENSE file.
44

55
import argparse
6+
import json
67
import deepl
78
import logging
89
import os
@@ -322,6 +323,15 @@ def add_common_arguments(subparser: argparse.ArgumentParser):
322323
type=str,
323324
help="ID of glossary to use for translation",
324325
)
326+
subparser.add_argument(
327+
"--extra-body-parameters",
328+
dest="extra_body_parameters",
329+
type=json.loads,
330+
default=None,
331+
help="additional body parameters to include in the API request, "
332+
"specified as a JSON object string, for example: "
333+
'\'{"tag_handling": "xml", "show_billed_characters": true}\'',
334+
)
325335

326336
# create the parser for the "text" command
327337
parser_text = subparsers.add_parser(

0 commit comments

Comments
 (0)