add translate api

This commit is contained in:
Nicola Zambello 2025-04-02 14:22:10 +03:00
parent 282462103b
commit 583856d0cb
Signed by: nzambello
GPG key ID: 0A7E9D12831FAAF9
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,25 @@
meta {
name: Translate (GET)
type: http
seq: 5
}
get {
url: {{host}}/api/translate?text=Ciao&source_lang=IT&target_lang=EN
body: none
auth: inherit
}
params:query {
text: Ciao
source_lang: IT
target_lang: EN
}
docs {
# Translate
Uses [DeepL](https://deepl.com).
Ref: [docs](https://docs.google.com/document/d/1R2zDCgPssAW9ukxa6Iz6b49Ju9k-3naAjdQzbtAP1to)
}

View file

@ -0,0 +1,27 @@
meta {
name: Translate (POST)
type: http
seq: 6
}
post {
url: {{host}}/api/translate
body: json
auth: inherit
}
body:json {
{
"text": "Ciao",
"source_lang": "IT",
"target_lang": "EN"
}
}
docs {
# Translate
Uses [DeepL](https://deepl.com).
Ref: [docs](https://docs.google.com/document/d/1R2zDCgPssAW9ukxa6Iz6b49Ju9k-3naAjdQzbtAP1to)
}