public
Description: Integrate your site with http://fetchapp.com for seamless digital storage + delivery
Homepage: http://fetchapp.com
Clone URL: git://github.com/pixallent/fetchapi-ruby.git
Click here to lend your support to: fetchapi-ruby and make a donation at www.pledgie.com !
name age message
file .gitignore Thu Apr 30 23:22:35 -0700 2009 updated ignore [mikelarkin]
file CHANGELOG Mon May 04 09:42:01 -0700 2009 prelim rdocs, enhancments [mikelarkin]
file LICENSE Thu Apr 30 07:33:05 -0700 2009 added additional files [mikelarkin]
file Manifest Thu Apr 30 23:25:12 -0700 2009 beta version ready [mikelarkin]
file README Mon May 04 09:42:01 -0700 2009 prelim rdocs, enhancments [mikelarkin]
file Rakefile Mon May 04 09:42:01 -0700 2009 prelim rdocs, enhancments [mikelarkin]
file fetchapi-ruby.gemspec Mon May 04 09:42:01 -0700 2009 prelim rdocs, enhancments [mikelarkin]
file init.rb Thu Apr 30 07:39:55 -0700 2009 renamed source file [mikelarkin]
directory lib/ Mon May 04 09:42:01 -0700 2009 prelim rdocs, enhancments [mikelarkin]
README
= Installation
 From Github
  gem sources -a http://gems.github.com (you only have to do this once)
  gem install pixallent-fetchapi-ruby                                                   
 
 RubyForge
  coming soon!
                
= Setup
  FetchAPI::Base.basic_auth('youraccount.fetchapp.com', 'demokey', 'demotoken')
  
= Account

  account = FetchAPI::Account.details
  
  token = FetchAPI::Account.new_token  *Subsequent calls will use the new token automatically

= Downloads

  downloads = FetchAPI::Download.find(:all, :per_page => 50, :page => 2)
  
  download = FetchAPI::Download.find(1)
  

= Items

  items = FetchAPI::Item.find(:all, :per_page => 10, :page => 3)

  item = FetchAPI::Item.find("CJ0001")

  item = FetchAPI::Item.create(:sku => "CJ0001", :name => "Carrot Juice")
  
  item.update(:name => "Tomato Juice")
  
  item.destroy
  
  downloads = item.downloads  *Returns an array of FetchAPI::Downloads for this item

= Orders  

  all_orders = FetchAPI::Order.find(:all)            

  current_orders = FetchAPI::Order.find(:current, :page => 3)
  
  manual_orders = FetchAPI::Order.find(:manual, :per_page => 10)

  expired_orders = FetchAPI::Order.find(:expired, :per_page => 10, :page => 3)

  order = FetchAPI::Order.find("1001")
  
  order = FetchAPI::Order.create(:id => "1015", :title => "Test Order", :first_name => "Donald", :last_name => "Duck", 
  :email => "donald@duck.com", :order_items => [{:sku => 'ABC0001'}, {:sku => 'ABC0002}])
  
  order.update(:first_name => "Daffy")
  
  order.destroy
  
  downloads = order.downloads  *Returns an array of FetchAPI::Downloads for this order