[−][src]Crate papago
Papago module
Example
let auth = config::get_auth_from_env().unwrap(); let payload = PapagoReq { source: Lang::En, target: Lang::Ko, text: "HELLO WORLD".to_owned(), }; let resp = send_request(NMT_URL, &auth, payload).unwrap(); assert_eq!(resp, "안녕 세계".to_owned());
Re-exports
pub use self::api::NMT_URL; |
pub use self::api::SMT_URL; |
pub use self::api::send_request; |
Modules
api |
Actual Papago API wrapper module. |
argparse |
CLI Arguments |
config |
Configuration module. It contains Auth |
Structs
PapagoReq |
PapagoReq is the payload sent to Naver Papago API
It has to be sent as a form request ( |
Enums
Lang |
Lang is a target/source language For more information, check official doc |