Username Profanity API - Ruby Gem
Username Profanity Checker is a simple tool for checking if a username is inappropriate or profane. It returns if the username is inappropriate or profane.
Installation
Add this line to your application's Gemfile:
gem 'apiverve_usernameprofanity'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install apiverve_usernameprofanity
Getting Started
Get your API key at APIVerve
Basic Usage
require 'apiverve_usernameprofanity'
# Initialize the client
client = APIVerve::Usernameprofanity::Client.new(api_key: "YOUR_API_KEY")
# Make a request
response = client.execute({ username: "b00bs" })
# Print the response
puts response
Error Handling
begin
response = client.execute({ username: "b00bs" })
puts response["data"]
rescue APIVerve::Usernameprofanity::ValidationError => e
puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Usernameprofanity::APIError => e
puts "API error: #{e.}"
puts "Status code: #{e.status_code}"
end
Debug Mode
# Enable debug logging
client = APIVerve::Usernameprofanity::Client.new(
api_key: "YOUR_API_KEY",
debug: true
)
Example Response
{
"status": "ok",
"error": null,
"data": {
"username": "b00bs",
"isProfane": true
}
}
Documentation
For more information, visit the API Documentation.
Support
- Website: https://usernameprofanity.apiverve.com?utm_source=ruby&utm_medium=readme
- Email: hello@apiverve.com
License
This gem is available under the MIT License.