Skip to content

πŸ’© Small HTTP client for the Webpurify API following the sans-io approach πŸ¦€

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

EmbarkStudios/tame-webpurify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ’© tame-webpurify

Super simple client for the WebPurify REST API

Embark Embark Crates.io Docs dependency status

What is this?

An incredibly small library to interact with the https://www.webpurify.com/documentation/ REST API.

tame-webpurify takes the sans-io approach and builds up the request objects for you so that you can use whatever library you're used to for the actual HTTP transport.

Please be advised that the source code will contain some swearing etc. Can't test a profanity filter / content-moderation API without actually acting like a jerk.

See the example code on how to use it tame-webpurify together with reqwest

Examples

Build and run the provided example:

$ cargo run --example profanity -- --apikey <your-webpurify-api-key>
=> 
 
{
  status: 200,
  version: HTTP/2.0,
  headers: { ... },
  body: {
    "rsp": {
      "@attributes": {
        "stat": "ok",
        "rsp": "0.062274932861328"
      },
      "method": "webpurify.live.replace",
      "format": "rest",
      "found": "3",
      "text": "**** you man! call me at +**********3 or email me at ****.****@*******.***",
      "api_key": "some-api-key"
    }
  }
}

Supported methods

The following WebPurify methods are currently available:

pub enum Method {
    /// webpurify.live.check
    Check,
    /// webpurify.live.check
    Replace(String),
}

Contributing

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started. Please also read our Contributor Terms before you make any contributions.

Any contribution intentionally submitted for inclusion in an Embark Studios project, shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:

License

This contribution is dual licensed under EITHER OF

at your option.

For clarity, "your" refers to Embark or any other licensee/user of the contribution.

About

πŸ’© Small HTTP client for the Webpurify API following the sans-io approach πŸ¦€

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages