Leet Speak API - Ruby Gem

Leet Speak is a simple tool for encoding and decoding Leet Speak. It returns the encoded or decoded Leet Speak.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_leetspeak'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_leetspeak

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_leetspeak'

# Initialize the client
client = APIVerve::Leetspeak::Client.new(api_key: "YOUR_API_KEY")

# Make a request
response = client.execute({
  text: "This is a simple piece of text",
  mode: "encode"
})

# Print the response
puts response

Error Handling

begin
  response = client.execute({ text: "This is a simple piece of text", mode: "encode" })
  puts response["data"]
rescue APIVerve::Leetspeak::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Leetspeak::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

# Enable debug logging
client = APIVerve::Leetspeak::Client.new(
  api_key: "YOUR_API_KEY",
  debug: true
)

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "text": "7h!5 !5 4 5!mp13 p!3c3 0f 73x7",
    "mode": "encode",
    "changedCharacters": 17
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.