update api docs

This commit is contained in:
John Woodlock
2012-05-29 16:28:35 +10:00
parent 7bcd4fb9ba
commit ba706b3a9f
+12 -8
View File
@@ -275,8 +275,10 @@ var jqxhr = $.ajax({
<div class="method-description"> <div class="method-description">
<h3>Updating Dates and Numbers</h3> <h3>Updating Dates and Numbers</h3>
<h4>Dates</h4> <h4>Dates</h4>
<p>When updating dates you need to provide the "dateFormat". This can be any date pattern supported by <a href="http://joda-time.sourceforge.net/api-release/org/joda/time/format/DateTimeFormat.html">Joda-Time</a>. <p>Dates are returned in GET requests as an array e.g. [ 2007, 4, 11]. However, they are sent as strings in POST and PUT requests.
This helps when saving data in your client application as you shouldn't need to do any date format conversion.</p> If there are any dates in your POST or PUT requests, you need to provide the "dateFormat".
This can be any date pattern supported by <a href="http://joda-time.sourceforge.net/api-release/org/joda/time/format/DateTimeFormat.html">Joda-Time</a>.
This capability can help you when saving data in your client application as you shouldn't need to do any date format conversion prior to issuing your POST or PUT request.</p>
<code> <code>
JSON examples: JSON examples:
{ {
@@ -289,17 +291,19 @@ JSON examples:
} }
</code> </code>
<h4>Numbers</h4> <h4>Numbers</h4>
<p>When updating dates you need to provide the "dateFormat". This can be any date pattern supported by <a href="http://joda-time.sourceforge.net/api-release/org/joda/time/format/DateTimeFormat.html">Joda-Time</a>. <p>Similar to dates above, if you format numbers based on a "locale" in your User Interface you need to provide the "locale" when updating.</a>.
This helps when saving data in your client application as you shouldn't need to do any date format conversion.</p>
<code> <code>
JSON examples: JSON examples:
{ {
"dateFormat": "dd MMMM yyyy", "locale": "en-us",
"openingDate": "01 July 2007" "principal": "240 400.88"
} }
{ {
"dateFormat": "yyyy-MM-dd", "locale": "fr-CH",
"openingDate": "2007-03-21" "principal": "240 400.88"
}
{
"principal": "240400.88"
} }
</code> </code>
</div> </div>