Typed HTTP wrapper for interacting with DeepL API. File upload/download is also implemented.
toml
[dependencies]
deepl = "0.2.0"
```rust use deepl::{DeepLApi, Lang};
let api = DeepLApi::new("YOUR AUTH KEY");
let props = TranslateTextProp::builder() .target_lang(Lang::ZH) .build(); let translated = api.translate("Hello World", &props).await.unwrap();
assert!(!translated.translations.is_empty());
let sentences = translated.translations; assert_eq!(sentences[0].text, "你好,世界"); ```