https://github.com/lbrealdev/bad-words-api
Reqwest and Tokio
https://github.com/lbrealdev/bad-words-api
api reqwest rust tokio
Last synced: 5 months ago
JSON representation
Reqwest and Tokio
- Host: GitHub
- URL: https://github.com/lbrealdev/bad-words-api
- Owner: lbrealdev
- Created: 2025-06-06T12:32:18.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-12-12T14:03:21.000Z (6 months ago)
- Last Synced: 2025-12-14T05:18:53.047Z (6 months ago)
- Topics: api, reqwest, rust, tokio
- Language: Rust
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bad-words-api
This repository is a simple example of how to use Reqwest to interact with the **Bad Words API** through **API Layer**.
To run this example, first create an account on [API Layer](https://apilayer.com/) for a free subscription and generate your API Key.
> [!TIP]
> You can also use an alias email service like [SimpleLogin](https://simplelogin.io/) or [Addy](https://addy.io/) to create your account.
## Usage
> [!NOTE]
> This repository uses [just](https://github.com/casey/just) as a command task runner.
Before running the request, create an `.env` file with your token:
```shell
echo 'TOKEN=' > .env
```
To make a request, run the following commands below:
```shell
just run
```
Output:
```json
{
"bad_words_total": 1,
"input_content": "This new software is absolute bullshit.",
"output_content": "This new software is absolute ********."
}
```
It's also possible to pass a new sentence as an argument:
```shell
just run "That guy is such a complete ass, I wish he would just leave."
```
Output:
```json
{
"bad_words_total": 2,
"input_content": "That guy is such a complete ass, I wish he would just leave.",
"output_content": "That *** is such a complete ***, I wish he would just leave."
}
```
## Sources
- https://github.com/apilayer/
- https://apilayer.com/marketplace/bad_words-api