pub fn profanity_replace_request(
api_key: &str,
region: Region,
text: &str,
replace_text: &str,
) -> Result<Request<Vec<u8>>, RequestError>Expand description
WebPurify replaces matched profanities, PII etc with a given symbol.
This function only returns a request object, you need to do the actual HTTP request yourself.
Extend the function when more languages are required. Documentation: https://www.webpurify.com/documentation/additional/language/
§Arguments
-
api_key- a string slice that holds yourWebPurifyAPI Key -
region- the regionalWebPurifyAPI to use -
text- a string slice you want to be moderated byWebPurify -
replace_text- a string slice to replace profanities intextwith
§Examples
use tame_webpurify::client;
let res = client::profanity_replace_request("some-api-key", client::Region::Europe, "my filthy user-input string", "*");