infovore / ruminant forked from james/ruminant

A ruby library to regurgitate MOO products

ruminant / README
55c8d5f6 » James Darling 2008-06-30 README 1 Ruminant
2 ========
3
7831e4eb » James Darling 2008-09-15 bold claims 4 Aiming to make the moo API almost as easy to use for developers as the moo.com site itself.
7f143e28 » James Darling 2008-09-15 bold claims 5
f4650bb7 » James Darling 2008-07-02 my struct thingy, and readme 6 Installation
7 ------------
8
9 If you've never installed a gem from github before - enter the following and you will eternally be graced by a thousand minds:
10 gem sources -a http://gems.github.com
11
12 Then you can install this like any other gem:
5534a51c » infovore 2008-09-26 Changing gem install path i... 13 gem install infovore-ruminant
73f6c4a1 » James Darling 2008-09-15 docs 14
f4650bb7 » James Darling 2008-07-02 my struct thingy, and readme 15 Usage
16 -----
17
6b416659 » infovore 2008-09-25 Updating README. 18 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.
73f6c4a1 » James Darling 2008-09-15 docs 19
20 Making an order:
727f38db » James Darling 2008-09-15 docs 21 require 'rubygems'
22 require 'moo'
73f6c4a1 » James Darling 2008-09-15 docs 23 order = Moo::Order.new(:api_key => "your api key")
24
25 Adding a product:
26 moocard = Moo::MiniCard.new(:url => "http://farm...")
f4650bb7 » James Darling 2008-07-02 my struct thingy, and readme 27 order.designs << moocard
73f6c4a1 » James Darling 2008-09-15 docs 28
29 Adding text
30 moocard.text = "This is line 1 \n This is line 2"
31 moocard.line(1) #=> This is line 1
32 moocard.line(1).bold = true
33 moocard.line(1).align = "right"
34 moocard.line(1).font = "modern"
35 moocard.line(1).colour = "#444444"
36 moocard.bold = true # sets bold=true on all lines
37
38 Submitting to moo:
39 order.to_xml # Gives you the generated xml if you want to manually submit it
40 order.submit
41 if order.error?
42 order.error_string
43 else
44 order.start_url
45 end
46
47 Current Limitations
48 -------------------
49
6b416659 » infovore 2008-09-25 Updating README. 50 Currently I only support MiniCards and Stickers, but have made it incredibly easy to add the other supported products.
73f6c4a1 » James Darling 2008-09-15 docs 51 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.
52
53 Manual Cropping is not currently supported for the same reason.
54
55 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.
f4650bb7 » James Darling 2008-07-02 my struct thingy, and readme 56
55c8d5f6 » James Darling 2008-06-30 README 57 Contributors thus far
58 ---------------------
f4650bb7 » James Darling 2008-07-02 my struct thingy, and readme 59 Xenia Kingsley - Naming powers
60 Chris Mear - Fixing stuff, and provides the wine
61 Dan Webb - Wisdom
6b416659 » infovore 2008-09-25 Updating README. 62 Tom Armitage - adding Moo::Sticker
e8b2ce8b » James Darling 2008-07-01 ASCIIgit statusgit status 63
64
65 (__)
66 (oo)
67 /-------\/
68 / | ||
69 * ||----||
70 ~~ ~~