Sha256: d28a56b8244cea2b17ce9f93a852d9f448f8f1ecb7381f68ef09818a623e9f8b
Contents?: true
Size: 1.5 KB
Versions: 3
Compression:
Stored size: 1.5 KB
Contents
= Love This library accesses the Tender REST API. It is my ode to and thanks for the tender lovemaking Aaron Patterson is doing on ActiveRecord. It is currently read-only, and made especially for scripts that import data from Tender to use in your own application. Feel free to fork and add missing API calls. == Why? I previously used HTTParty to connect to the Tender API, but I ran into two issues: * HTTParty's JSON decoding is really slow, and resulted in "stack level too deep" exceptions. Love uses yajl to decode JSON instead. * Because Tender does not check or convert the encoding of email messages that they receive, invalid UTF-8 characters can get into the system, which will break Ruby 1.9. Love handles character encoding manually, and will replace all the invalid UTF-8 characters by the UTF "unknown character" character. * I had to handle paging manually to get all data. Love will automatically send multiple requests to get all the pages to iterate over all the available objects. == Installation Run <tt>gem install love</tt> or add <tt>gem 'love'</tt> to your Gemfile. == Usage require 'love' tender = Love.connect('account', 'api_key') # Loop over all discussions: tender.each_discussion do |discussion| # your awesome stuff here end # Also available: tender.each_user { |c| ... } tender.each_queue { |q| ... } tender.each_category { |c| ... } == About This library is Written by Willem van Bergen for Shopify, and is MIT licensed.
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
love-0.0.4 | README.rdoc |
love-0.0.3 | README.rdoc |
love-0.0.2 | README.rdoc |