…s, I guess.
|Failed to load latest commit information.|
|lib||Adding notecards and greetingcards too. Now we need to count the line…|
|console||lazy is good|
Ruminant ======== Aiming to make the moo API almost as easy to use for developers as the moo.com site itself. Installation ------------ If you've never installed a gem from github before - enter the following and you will eternally be graced by a thousand minds: gem sources -a http://gems.github.com Then you can install this like any other gem: gem install infovore-ruminant Usage ----- All parameters are done in an ActiveRecord attributes style, i.e. they can be passed into new() as a hash, and are all attr-accessors. Note that product objects do not have attributes that are not impossible for that product, and that a Sticker will raise an error if you try to give it text. Making an order: require 'rubygems' require 'moo' order = Moo::Order.new(:api_key => "your api key") Adding a product: moocard = Moo::MiniCard.new(:url => "http://farm...") order.designs << moocard Adding text moocard.text = "This is line 1 \n This is line 2" moocard.line(1) #=> This is line 1 moocard.line(1).bold = true moocard.line(1).align = "right" moocard.line(1).font = "modern" moocard.line(1).colour = "#444444" moocard.bold = true # sets bold=true on all lines Submitting to moo: order.to_xml # Gives you the generated xml if you want to manually submit it order.submit if order.error? order.error_string else order.start_url end Current Limitations ------------------- Currently I only support MiniCards and Stickers, but have made it incredibly easy to add the other supported products. I haven't yet, as I do not have a personal need, so don't feel I can test it. If you have such a need, do let me know, as we can add it. Manual Cropping is not currently supported for the same reason. Please please please do feel to give feedback and/or submit patches. I want this library to be as helpful as possible, but can only do that if I know what you want. Contributors thus far --------------------- Xenia Kingsley - Naming powers Chris Mear - Fixing stuff, and provides the wine Dan Webb - Wisdom Tom Armitage - adding Moo::Sticker (__) (oo) /-------\/ / | || * ||----|| ~~ ~~