Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update README.md

  • Loading branch information...
commit b9cfc086cf6a4993ec994721575b8c7f13e5ff7c 1 parent 249f43f
@tmoskun authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.md
View
4 README.md
@@ -40,10 +40,10 @@ initialize_from_api :url => "http://api.bart.gov/api/", :command => 'etd.aspx',
end
```
In this example, the url generated to get real time departure estimates from the Richmond station will be:
-"http://api.bart.gov/api/etd.aspx?cmd=etd&orig=RICH&key=MW9S-E7SL-26DU-VV8V"
+http://api.bart.gov/api/etd.aspx?cmd=etd&orig=RICH&key=MW9S-E7SL-26DU-VV8V
3) Define class attributes and mapping of the attributes to the api where the api name is different. To define api simple type mappings, use "api_column <attribute name>, <api attribute name>".
-To define api association mapping, use "api_association <association attribute name>, <api attribute name>, :as => <association class name>". Either the second, or the third parameters could be omitted. If the third parameter is omitted, it's mapped to the class name by the attribute name defined in the class.
+To define api association mapping, use "api_association \<association attribute name\>, \<api attribute name\>, :as => \<association class name\>". Either the second, or the third parameters could be omitted. If the third parameter is omitted, it's mapped to the class name by the attribute name defined in the class.
In the following example, a simple attribute name is "abbreviation", but the name defined in the api XML documents is "abbr". An association is defined in the attribute :est, the api mapping is :etd and it's an object of the class Estimate.
Please sign in to comment.
Something went wrong with that request. Please try again.