Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'unirest'
- puts "Enter text to translate into l33t:"
- input = gets.chomp
- input.gsub!("+", "%2B") # encode +s
- input.gsub!(" ", "+")
- puts ""
- response = Unirest.get "https://montanaflynn-l33t-sp34k.p.mashape.com/encode?text=#{input}",
- headers:{:'X-Mashape-Key' => "tgz0o5hZ9jmshYIa3QgprhruS5j5p1Gjfchjsng6F7pkxJMB4W", :'Content-Type' => "application/x-www-form-urlencoded"}
- puts "Translated text:"
- puts response.body
Advertisement
Add Comment
Please, Sign In to add comment