This is almost completely stolen from the spreedly gem, but I added some custom methods and didn’t want to be a slave to the gem. It allows you to do things like Subscriber.create!(id, email=nil, screen_name=nil) & Subscriber.activate_free_trial. I was using active resource with merb previously but Nathaniel’s spreedly gem convinced me to use HTTParty instead.
To use, create a file in app/models/subscriber.rb and paste the following in. I am using AppConfig for the settings. (sudo gem install merb_app_config).
Here’s some example usage.
Spitfire Sky | github | archives | resume