Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More doc cleanup

  • Loading branch information...
commit f2e846b105d67d16ceac96f9eced241f5d64d8a7 1 parent 050bef3
Ben Johnson yourewelcome authored

Showing 1 changed file with 16 additions and 9 deletions. Show diff stats Hide diff stats

  1. +16 9 README.rdoc
25 README.rdoc
Source Rendered
@@ -37,17 +37,17 @@ What's unique about this library is it's usage / syntax. Let me show you...
37 37
38 38 === Calls to the web services are lazy
39 39
40   -A simple example:
  40 +A simple example where we want to track a FedEx package:
41 41
42 42 fedex = Shippinglogic::FedEx.new(key, password, account, meter) # all credentials FedEx requires
43 43 tracking = fedex.track(:tracking_number => "077973360403984")
44 44
45   -Now here is why this is cool. Nothing has happened yet. No call has been made to the FedEx web services, etc. We do this because we don't need it yet. You don't need it until you start using the object. Lets continue with our example:
  45 +Now here is why this is cool. Nothing has happened yet. No call has been made to the FedEx servers, etc. We do this because we don't need it yet. You don't need it until you start using the object. Lets continue with our example:
46 46
47 47 tracking.first # call is made to FedEx and returns the first tracking result in the array
48 48 tracking.size # cache is used to determine the size of the array
49 49
50   -This is similar to how ActiveRecord's association proxies work. When you call user.orders no database activity occurs until you use the object.
  50 +This is similar to how ActiveRecord's association proxies work. When you call user.orders no database activity occurs until you actually use the object.
51 51
52 52 === Flexibility
53 53
@@ -72,6 +72,19 @@ You will notice above we assign the result of the 'track' method to a variable c
72 72 tracking.attributes
73 73 # => {:tracking_number => "ZZZZZZZZZZZZZZZZ"}
74 74
  75 +== Available services and their features
  76 +
  77 +This library is still very new, as a result only FedEx is support at this time. More will come.
  78 +
  79 +=== FedEx
  80 +
  81 +1. <b>Tracking</b> - See Shippinglogic::Fedex::Track
  82 +1. <b>Getting service rates</b> - See Shippinglogic::Fedex::Rates
  83 +
  84 +== Add your own services
  85 +
  86 +Simply fork the project and make your changes. If you want to add support for a new service it should be fairly straight forward. Checkout the code in Shippinglogic::Fedex::Track, it very simple and easy to follow. It's a great place to start because its the simplest of services.
  87 +
75 88 == Interface integration
76 89
77 90 What's nice about having an object is that you can pass it around. Let's say you wanted to add simple FedEx tracking functionality to your app:
@@ -110,12 +123,6 @@ Then your results:
110 123 .location== #{event.city}, #{event.state} #{event.postal_code}, #{event.country}
111 124 .residential= event.residential ? "Yes" : "No"
112 125
113   -== Supported services
114   -
115   -This library is still very new, I plan to support more services as the library grows, but here is a break down of what it supports:
116   -
117   -1. FedEx: rating, tracking, creating new shipments (with labels), canceling shipments
118   -
119 126 == Copyright
120 127
121 128 Copyright (c) 2009 {Ben Johnson of Binary Logic}[http://www.binarylogic.com], released under the MIT license

0 comments on commit f2e846b

Please sign in to comment.
Something went wrong with that request. Please try again.