I recently found myself needing to use TinyURL on a client project. I did a bit of scouring the web for some Ruby code to solve the problem but with little success. Much to my surprise they don’t have an available API, but they do have a way to access over HTTP.
This is a simple Ruby class to use TinyURL. Note: this depends on HTTParty, so add to your project.
class Tinyurlinclude HTTParty
You can find the Gist on Github. Hopefully you find this code useful. Enjoy!