<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ModelSync.REST - YUI 3</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="../assets/css/logo.png" title="YUI 3"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 3.10.3</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/Anim.html">Anim</a></li>
<li><a href="../classes/App.html">App</a></li>
<li><a href="../classes/App.Base.html">App.Base</a></li>
<li><a href="../classes/App.Content.html">App.Content</a></li>
<li><a href="../classes/App.Transitions.html">App.Transitions</a></li>
<li><a href="../classes/App.TransitionsNative.html">App.TransitionsNative</a></li>
<li><a href="../classes/AreaSeries.html">AreaSeries</a></li>
<li><a href="../classes/AreaSplineSeries.html">AreaSplineSeries</a></li>
<li><a href="../classes/Array.html">Array</a></li>
<li><a href="../classes/ArrayList.html">ArrayList</a></li>
<li><a href="../classes/ArraySort.html">ArraySort</a></li>
<li><a href="../classes/AsyncQueue.html">AsyncQueue</a></li>
<li><a href="../classes/Attribute.html">Attribute</a></li>
<li><a href="../classes/AttributeCore.html">AttributeCore</a></li>
<li><a href="../classes/AttributeEvents.html">AttributeEvents</a></li>
<li><a href="../classes/AttributeExtras.html">AttributeExtras</a></li>
<li><a href="../classes/AttributeLite.html">AttributeLite</a></li>
<li><a href="../classes/AttributeObservable.html">AttributeObservable</a></li>
<li><a href="../classes/AutoComplete.html">AutoComplete</a></li>
<li><a href="../classes/AutoCompleteBase.html">AutoCompleteBase</a></li>
<li><a href="../classes/AutoCompleteFilters.html">AutoCompleteFilters</a></li>
<li><a href="../classes/AutoCompleteHighlighters.html">AutoCompleteHighlighters</a></li>
<li><a href="../classes/AutoCompleteList.html">AutoCompleteList</a></li>
<li><a href="../classes/Axis.html">Axis</a></li>
<li><a href="../classes/AxisBase.html">AxisBase</a></li>
<li><a href="../classes/BarSeries.html">BarSeries</a></li>
<li><a href="../classes/Base.html">Base</a></li>
<li><a href="../classes/BaseCore.html">BaseCore</a></li>
<li><a href="../classes/BaseObservable.html">BaseObservable</a></li>
<li><a href="../classes/BottomAxisLayout.html">BottomAxisLayout</a></li>
<li><a href="../classes/Button.html">Button</a></li>
<li><a href="../classes/ButtonCore.html">ButtonCore</a></li>
<li><a href="../classes/ButtonGroup.html">ButtonGroup</a></li>
<li><a href="../classes/Cache.html">Cache</a></li>
<li><a href="../classes/CacheOffline.html">CacheOffline</a></li>
<li><a href="../classes/Calendar.html">Calendar</a></li>
<li><a href="../classes/CalendarBase.html">CalendarBase</a></li>
<li><a href="../classes/CandlestickSeries.html">CandlestickSeries</a></li>
<li><a href="../classes/CanvasCircle.html">CanvasCircle</a></li>
<li><a href="../classes/CanvasDrawing.html">CanvasDrawing</a></li>
<li><a href="../classes/CanvasEllipse.html">CanvasEllipse</a></li>
<li><a href="../classes/CanvasGraphic.html">CanvasGraphic</a></li>
<li><a href="../classes/CanvasPath.html">CanvasPath</a></li>
<li><a href="../classes/CanvasPieSlice.html">CanvasPieSlice</a></li>
<li><a href="../classes/CanvasRect.html">CanvasRect</a></li>
<li><a href="../classes/CanvasShape.html">CanvasShape</a></li>
<li><a href="../classes/CartesianChart.html">CartesianChart</a></li>
<li><a href="../classes/CartesianSeries.html">CartesianSeries</a></li>
<li><a href="../classes/CategoryAxis.html">CategoryAxis</a></li>
<li><a href="../classes/CategoryAxisBase.html">CategoryAxisBase</a></li>
<li><a href="../classes/CategoryImpl.html">CategoryImpl</a></li>
<li><a href="../classes/Chart.html">Chart</a></li>
<li><a href="../classes/ChartBase.html">ChartBase</a></li>
<li><a href="../classes/ChartLegend.html">ChartLegend</a></li>
<li><a href="../classes/Circle.html">Circle</a></li>
<li><a href="../classes/CircleGroup.html">CircleGroup</a></li>
<li><a href="../classes/ClassNameManager.html">ClassNameManager</a></li>
<li><a href="../classes/ClickableRail.html">ClickableRail</a></li>
<li><a href="../classes/Color.html">Color</a></li>
<li><a href="../classes/Color.Harmony.html">Color.Harmony</a></li>
<li><a href="../classes/Color.HSL.html">Color.HSL</a></li>
<li><a href="../classes/Color.HSV.html">Color.HSV</a></li>
<li><a href="../classes/ColumnSeries.html">ColumnSeries</a></li>
<li><a href="../classes/ComboSeries.html">ComboSeries</a></li>
<li><a href="../classes/ComboSplineSeries.html">ComboSplineSeries</a></li>
<li><a href="../classes/config.html">config</a></li>
<li><a href="../classes/Console.html">Console</a></li>
<li><a href="../classes/Controller.html">Controller</a></li>
<li><a href="../classes/Cookie.html">Cookie</a></li>
<li><a href="../classes/CurveUtil.html">CurveUtil</a></li>
<li><a href="../classes/CustomEvent.html">CustomEvent</a></li>
<li><a href="../classes/DataSchema.Array.html">DataSchema.Array</a></li>
<li><a href="../classes/DataSchema.Base.html">DataSchema.Base</a></li>
<li><a href="../classes/DataSchema.JSON.html">DataSchema.JSON</a></li>
<li><a href="../classes/DataSchema.Text.html">DataSchema.Text</a></li>
<li><a href="../classes/DataSchema.XML.html">DataSchema.XML</a></li>
<li><a href="../classes/DataSource.Function.html">DataSource.Function</a></li>
<li><a href="../classes/DataSource.Get.html">DataSource.Get</a></li>
<li><a href="../classes/DataSource.IO.html">DataSource.IO</a></li>
<li><a href="../classes/DataSource.Local.html">DataSource.Local</a></li>
<li><a href="../classes/DataSourceArraySchema.html">DataSourceArraySchema</a></li>
<li><a href="../classes/DataSourceCache.html">DataSourceCache</a></li>
<li><a href="../classes/DataSourceCacheExtension.html">DataSourceCacheExtension</a></li>
<li><a href="../classes/DataSourceJSONSchema.html">DataSourceJSONSchema</a></li>
<li><a href="../classes/DataSourceTextSchema.html">DataSourceTextSchema</a></li>
<li><a href="../classes/DataSourceXMLSchema.html">DataSourceXMLSchema</a></li>
<li><a href="../classes/DataTable.html">DataTable</a></li>
<li><a href="../classes/DataTable.Base.html">DataTable.Base</a></li>
<li><a href="../classes/DataTable.BodyView.html">DataTable.BodyView</a></li>
<li><a href="../classes/DataTable.BodyView.Formatters.html">DataTable.BodyView.Formatters</a></li>
<li><a href="../classes/DataTable.ColumnWidths.html">DataTable.ColumnWidths</a></li>
<li><a href="../classes/DataTable.Core.html">DataTable.Core</a></li>
<li><a href="../classes/DataTable.HeaderView.html">DataTable.HeaderView</a></li>
<li><a href="../classes/DataTable.Message.html">DataTable.Message</a></li>
<li><a href="../classes/DataTable.Mutable.html">DataTable.Mutable</a></li>
<li><a href="../classes/DataTable.Scrollable.html">DataTable.Scrollable</a></li>
<li><a href="../classes/DataTable.Sortable.html">DataTable.Sortable</a></li>
<li><a href="../classes/DataTable.TableView.html">DataTable.TableView</a></li>
<li><a href="../classes/Date.html">Date</a></li>
<li><a href="../classes/DD.DDM.html">DD.DDM</a></li>
<li><a href="../classes/DD.Delegate.html">DD.Delegate</a></li>
<li><a href="../classes/DD.Drag.html">DD.Drag</a></li>
<li><a href="../classes/DD.Drop.html">DD.Drop</a></li>
<li><a href="../classes/DD.Scroll.html">DD.Scroll</a></li>
<li><a href="../classes/Dial.html">Dial</a></li>
<li><a href="../classes/Do.html">Do</a></li>
<li><a href="../classes/Do.AlterArgs.html">Do.AlterArgs</a></li>
<li><a href="../classes/Do.AlterReturn.html">Do.AlterReturn</a></li>
<li><a href="../classes/Do.Error.html">Do.Error</a></li>
<li><a href="../classes/Do.Halt.html">Do.Halt</a></li>
<li><a href="../classes/Do.Method.html">Do.Method</a></li>
<li><a href="../classes/Do.Prevent.html">Do.Prevent</a></li>
<li><a href="../classes/DOM.html">DOM</a></li>
<li><a href="../classes/DOMEventFacade.html">DOMEventFacade</a></li>
<li><a href="../classes/Drawing.html">Drawing</a></li>
<li><a href="../classes/Easing.html">Easing</a></li>
<li><a href="../classes/EditorBase.html">EditorBase</a></li>
<li><a href="../classes/EditorSelection.html">EditorSelection</a></li>
<li><a href="../classes/Ellipse.html">Ellipse</a></li>
<li><a href="../classes/EllipseGroup.html">EllipseGroup</a></li>
<li><a href="../classes/Escape.html">Escape</a></li>
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/EventFacade.html">EventFacade</a></li>
<li><a href="../classes/EventHandle.html">EventHandle</a></li>
<li><a href="../classes/EventTarget.html">EventTarget</a></li>
<li><a href="../classes/ExecCommand.html">ExecCommand</a></li>
<li><a href="../classes/Features.html">Features</a></li>
<li><a href="../classes/File.html">File</a></li>
<li><a href="../classes/FileFlash.html">FileFlash</a></li>
<li><a href="../classes/FileHTML5.html">FileHTML5</a></li>
<li><a href="../classes/Fills.html">Fills</a></li>
<li><a href="../classes/Frame.html">Frame</a></li>
<li><a href="../classes/Get.html">Get</a></li>
<li><a href="../classes/Get.Transaction.html">Get.Transaction</a></li>
<li><a href="../classes/GetNodeJS.html">GetNodeJS</a></li>
<li><a href="../classes/Graph.html">Graph</a></li>
<li><a href="../classes/Graphic.html">Graphic</a></li>
<li><a href="../classes/GraphicBase.html">GraphicBase</a></li>
<li><a href="../classes/Gridlines.html">Gridlines</a></li>
<li><a href="../classes/GroupDiamond.html">GroupDiamond</a></li>
<li><a href="../classes/GroupRect.html">GroupRect</a></li>
<li><a href="../classes/Handlebars.html">Handlebars</a></li>
<li><a href="../classes/Highlight.html">Highlight</a></li>
<li><a href="../classes/Histogram.html">Histogram</a></li>
<li><a href="../classes/HistoryBase.html">HistoryBase</a></li>
<li><a href="../classes/HistoryHash.html">HistoryHash</a></li>
<li><a href="../classes/HistoryHTML5.html">HistoryHTML5</a></li>
<li><a href="../classes/HorizontalLegendLayout.html">HorizontalLegendLayout</a></li>
<li><a href="../classes/ImgLoadGroup.html">ImgLoadGroup</a></li>
<li><a href="../classes/ImgLoadImgObj.html">ImgLoadImgObj</a></li>
<li><a href="../classes/Intl.html">Intl</a></li>
<li><a href="../classes/IO.html">IO</a></li>
<li><a href="../classes/JSON.html">JSON</a></li>
<li><a href="../classes/JSONPRequest.html">JSONPRequest</a></li>
<li><a href="../classes/Lang.html">Lang</a></li>
<li><a href="../classes/LazyModelList.html">LazyModelList</a></li>
<li><a href="../classes/LeftAxisLayout.html">LeftAxisLayout</a></li>
<li><a href="../classes/Lines.html">Lines</a></li>
<li><a href="../classes/LineSeries.html">LineSeries</a></li>
<li><a href="../classes/Loader.html">Loader</a></li>
<li><a href="../classes/MarkerSeries.html">MarkerSeries</a></li>
<li><a href="../classes/Matrix.html">Matrix</a></li>
<li><a href="../classes/MatrixUtil.html">MatrixUtil</a></li>
<li><a href="../classes/Model.html">Model</a></li>
<li><a href="../classes/ModelList.html">ModelList</a></li>
<li><a href="../classes/ModelSync.REST.html">ModelSync.REST</a></li>
<li><a href="../classes/Node.html">Node</a></li>
<li><a href="../classes/NodeList.html">NodeList</a></li>
<li><a href="../classes/Number.html">Number</a></li>
<li><a href="../classes/NumericAxis.html">NumericAxis</a></li>
<li><a href="../classes/NumericAxisBase.html">NumericAxisBase</a></li>
<li><a href="../classes/NumericImpl.html">NumericImpl</a></li>
<li><a href="../classes/Object.html">Object</a></li>
<li><a href="../classes/OHLCSeries.html">OHLCSeries</a></li>
<li><a href="../classes/Overlay.html">Overlay</a></li>
<li><a href="../classes/Panel.html">Panel</a></li>
<li><a href="../classes/Parallel.html">Parallel</a></li>
<li><a href="../classes/Path.html">Path</a></li>
<li><a href="../classes/PieChart.html">PieChart</a></li>
<li><a href="../classes/PieSeries.html">PieSeries</a></li>
<li><a href="../classes/Pjax.html">Pjax</a></li>
<li><a href="../classes/PjaxBase.html">PjaxBase</a></li>
<li><a href="../classes/PjaxContent.html">PjaxContent</a></li>
<li><a href="../classes/Plots.html">Plots</a></li>
<li><a href="../classes/Plugin.Align.html">Plugin.Align</a></li>
<li><a href="../classes/Plugin.AutoComplete.html">Plugin.AutoComplete</a></li>
<li><a href="../classes/Plugin.Base.html">Plugin.Base</a></li>
<li><a href="../classes/Plugin.Button.html">Plugin.Button</a></li>
<li><a href="../classes/Plugin.Cache.html">Plugin.Cache</a></li>
<li><a href="../classes/Plugin.CalendarNavigator.html">Plugin.CalendarNavigator</a></li>
<li><a href="../classes/Plugin.ConsoleFilters.html">Plugin.ConsoleFilters</a></li>
<li><a href="../classes/Plugin.CreateLinkBase.html">Plugin.CreateLinkBase</a></li>
<li><a href="../classes/Plugin.DataTableDataSource.html">Plugin.DataTableDataSource</a></li>
<li><a href="../classes/Plugin.DDConstrained.html">Plugin.DDConstrained</a></li>
<li><a href="../classes/Plugin.DDNodeScroll.html">Plugin.DDNodeScroll</a></li>
<li><a href="../classes/Plugin.DDProxy.html">Plugin.DDProxy</a></li>
<li><a href="../classes/Plugin.DDWindowScroll.html">Plugin.DDWindowScroll</a></li>
<li><a href="../classes/Plugin.Drag.html">Plugin.Drag</a></li>
<li><a href="../classes/Plugin.Drop.html">Plugin.Drop</a></li>
<li><a href="../classes/Plugin.EditorBidi.html">Plugin.EditorBidi</a></li>
<li><a href="../classes/Plugin.EditorBR.html">Plugin.EditorBR</a></li>
<li><a href="../classes/Plugin.EditorLists.html">Plugin.EditorLists</a></li>
<li><a href="../classes/Plugin.EditorPara.html">Plugin.EditorPara</a></li>
<li><a href="../classes/Plugin.EditorParaBase.html">Plugin.EditorParaBase</a></li>
<li><a href="../classes/Plugin.EditorParaIE.html">Plugin.EditorParaIE</a></li>
<li><a href="../classes/Plugin.EditorTab.html">Plugin.EditorTab</a></li>
<li><a href="../classes/Plugin.ExecCommand.html">Plugin.ExecCommand</a></li>
<li><a href="../classes/Plugin.Flick.html">Plugin.Flick</a></li>
<li><a href="../classes/Plugin.Host.html">Plugin.Host</a></li>
<li><a href="../classes/plugin.NodeFocusManager.html">plugin.NodeFocusManager</a></li>
<li><a href="../classes/Plugin.NodeFX.html">Plugin.NodeFX</a></li>
<li><a href="../classes/plugin.NodeMenuNav.html">plugin.NodeMenuNav</a></li>
<li><a href="../classes/Plugin.Pjax.html">Plugin.Pjax</a></li>
<li><a href="../classes/Plugin.Resize.html">Plugin.Resize</a></li>
<li><a href="../classes/Plugin.ResizeConstrained.html">Plugin.ResizeConstrained</a></li>
<li><a href="../classes/Plugin.ResizeProxy.html">Plugin.ResizeProxy</a></li>
<li><a href="../classes/Plugin.ScrollInfo.html">Plugin.ScrollInfo</a></li>
<li><a href="../classes/Plugin.ScrollViewList.html">Plugin.ScrollViewList</a></li>
<li><a href="../classes/Plugin.ScrollViewPaginator.html">Plugin.ScrollViewPaginator</a></li>
<li><a href="../classes/Plugin.ScrollViewScrollbars.html">Plugin.ScrollViewScrollbars</a></li>
<li><a href="../classes/Plugin.Shim.html">Plugin.Shim</a></li>
<li><a href="../classes/Plugin.SortScroll.html">Plugin.SortScroll</a></li>
<li><a href="../classes/Plugin.Tree.Lazy.html">Plugin.Tree.Lazy</a></li>
<li><a href="../classes/Plugin.WidgetAnim.html">Plugin.WidgetAnim</a></li>
<li><a href="../classes/Pollable.html">Pollable</a></li>
<li><a href="../classes/Promise.html">Promise</a></li>
<li><a href="../classes/Promise.Resolver.html">Promise.Resolver</a></li>
<li><a href="../classes/QueryString.html">QueryString</a></li>
<li><a href="../classes/Queue.html">Queue</a></li>
<li><a href="../classes/RangeSeries.html">RangeSeries</a></li>
<li><a href="../classes/Record.html">Record</a></li>
<li><a href="../classes/Recordset.html">Recordset</a></li>
<li><a href="../classes/RecordsetFilter.html">RecordsetFilter</a></li>
<li><a href="../classes/RecordsetIndexer.html">RecordsetIndexer</a></li>
<li><a href="../classes/RecordsetSort.html">RecordsetSort</a></li>
<li><a href="../classes/Rect.html">Rect</a></li>
<li><a href="../classes/Renderer.html">Renderer</a></li>
<li><a href="../classes/Resize.html">Resize</a></li>
<li><a href="../classes/RightAxisLayout.html">RightAxisLayout</a></li>
<li><a href="../classes/Router.html">Router</a></li>
<li><a href="../classes/ScrollView.html">ScrollView</a></li>
<li><a href="../classes/Selector.html">Selector</a></li>
<li><a href="../classes/SeriesBase.html">SeriesBase</a></li>
<li><a href="../classes/Shape.html">Shape</a></li>
<li><a href="../classes/ShapeGroup.html">ShapeGroup</a></li>
<li><a href="../classes/Slider.html">Slider</a></li>
<li><a href="../classes/SliderBase.html">SliderBase</a></li>
<li><a href="../classes/SliderValueRange.html">SliderValueRange</a></li>
<li><a href="../classes/soon.html">soon</a></li>
<li><a href="../classes/Sortable.html">Sortable</a></li>
<li><a href="../classes/SplineSeries.html">SplineSeries</a></li>
<li><a href="../classes/StackedAreaSeries.html">StackedAreaSeries</a></li>
<li><a href="../classes/StackedAreaSplineSeries.html">StackedAreaSplineSeries</a></li>
<li><a href="../classes/StackedAxis.html">StackedAxis</a></li>
<li><a href="../classes/StackedAxisBase.html">StackedAxisBase</a></li>
<li><a href="../classes/StackedBarSeries.html">StackedBarSeries</a></li>
<li><a href="../classes/StackedColumnSeries.html">StackedColumnSeries</a></li>
<li><a href="../classes/StackedComboSeries.html">StackedComboSeries</a></li>
<li><a href="../classes/StackedComboSplineSeries.html">StackedComboSplineSeries</a></li>
<li><a href="../classes/StackedImpl.html">StackedImpl</a></li>
<li><a href="../classes/StackedLineSeries.html">StackedLineSeries</a></li>
<li><a href="../classes/StackedMarkerSeries.html">StackedMarkerSeries</a></li>
<li><a href="../classes/StackedSplineSeries.html">StackedSplineSeries</a></li>
<li><a href="../classes/StackingUtil.html">StackingUtil</a></li>
<li><a href="../classes/State.html">State</a></li>
<li><a href="../classes/StyleSheet.html">StyleSheet</a></li>
<li><a href="../classes/Subscriber.html">Subscriber</a></li>
<li><a href="../classes/SVGCircle.html">SVGCircle</a></li>
<li><a href="../classes/SVGDrawing.html">SVGDrawing</a></li>
<li><a href="../classes/SVGEllipse.html">SVGEllipse</a></li>
<li><a href="../classes/SVGGraphic.html">SVGGraphic</a></li>
<li><a href="../classes/SVGPath.html">SVGPath</a></li>
<li><a href="../classes/SVGPieSlice.html">SVGPieSlice</a></li>
<li><a href="../classes/SVGRect.html">SVGRect</a></li>
<li><a href="../classes/SVGShape.html">SVGShape</a></li>
<li><a href="../classes/SWF.html">SWF</a></li>
<li><a href="../classes/SWFDetect.html">SWFDetect</a></li>
<li><a href="../classes/SyntheticEvent.html">SyntheticEvent</a></li>
<li><a href="../classes/SyntheticEvent.Notifier.html">SyntheticEvent.Notifier</a></li>
<li><a href="../classes/SynthRegistry.html">SynthRegistry</a></li>
<li><a href="../classes/Tab.html">Tab</a></li>
<li><a href="../classes/TabView.html">TabView</a></li>
<li><a href="../classes/Template.html">Template</a></li>
<li><a href="../classes/Template.Micro.html">Template.Micro</a></li>
<li><a href="../classes/Test.ArrayAssert.html">Test.ArrayAssert</a></li>
<li><a href="../classes/Test.Assert.html">Test.Assert</a></li>
<li><a href="../classes/Test.AssertionError.html">Test.AssertionError</a></li>
<li><a href="../classes/Test.ComparisonFailure.html">Test.ComparisonFailure</a></li>
<li><a href="../classes/Test.Console.html">Test.Console</a></li>
<li><a href="../classes/Test.CoverageFormat.html">Test.CoverageFormat</a></li>
<li><a href="../classes/Test.DateAssert.html">Test.DateAssert</a></li>
<li><a href="../classes/Test.EventTarget.html">Test.EventTarget</a></li>
<li><a href="../classes/Test.Mock.html">Test.Mock</a></li>
<li><a href="../classes/Test.Mock.Value.html">Test.Mock.Value</a></li>
<li><a href="../classes/Test.ObjectAssert.html">Test.ObjectAssert</a></li>
<li><a href="../classes/Test.Reporter.html">Test.Reporter</a></li>
<li><a href="../classes/Test.Results.html">Test.Results</a></li>
<li><a href="../classes/Test.Runner.html">Test.Runner</a></li>
<li><a href="../classes/Test.ShouldError.html">Test.ShouldError</a></li>
<li><a href="../classes/Test.ShouldFail.html">Test.ShouldFail</a></li>
<li><a href="../classes/Test.TestCase.html">Test.TestCase</a></li>
<li><a href="../classes/Test.TestFormat.html">Test.TestFormat</a></li>
<li><a href="../classes/Test.TestNode.html">Test.TestNode</a></li>
<li><a href="../classes/Test.TestRunner.html">Test.TestRunner</a></li>
<li><a href="../classes/Test.TestSuite.html">Test.TestSuite</a></li>
<li><a href="../classes/Test.UnexpectedError.html">Test.UnexpectedError</a></li>
<li><a href="../classes/Test.UnexpectedValue.html">Test.UnexpectedValue</a></li>
<li><a href="../classes/Test.Wait.html">Test.Wait</a></li>
<li><a href="../classes/Text.AccentFold.html">Text.AccentFold</a></li>
<li><a href="../classes/Text.WordBreak.html">Text.WordBreak</a></li>
<li><a href="../classes/TimeAxis.html">TimeAxis</a></li>
<li><a href="../classes/TimeAxisBase.html">TimeAxisBase</a></li>
<li><a href="../classes/TimeImpl.html">TimeImpl</a></li>
<li><a href="../classes/ToggleButton.html">ToggleButton</a></li>
<li><a href="../classes/TopAxisLayout.html">TopAxisLayout</a></li>
<li><a href="../classes/Transition.html">Transition</a></li>
<li><a href="../classes/Tree.html">Tree</a></li>
<li><a href="../classes/Tree.Labelable.html">Tree.Labelable</a></li>
<li><a href="../classes/Tree.Node.html">Tree.Node</a></li>
<li><a href="../classes/Tree.Node.Labelable.html">Tree.Node.Labelable</a></li>
<li><a href="../classes/Tree.Node.Openable.html">Tree.Node.Openable</a></li>
<li><a href="../classes/Tree.Node.Selectable.html">Tree.Node.Selectable</a></li>
<li><a href="../classes/Tree.Node.Sortable.html">Tree.Node.Sortable</a></li>
<li><a href="../classes/Tree.Openable.html">Tree.Openable</a></li>
<li><a href="../classes/Tree.Selectable.html">Tree.Selectable</a></li>
<li><a href="../classes/Tree.Sortable.html">Tree.Sortable</a></li>
<li><a href="../classes/UA.html">UA</a></li>
<li><a href="../classes/Uploader.html">Uploader</a></li>
<li><a href="../classes/Uploader.Queue.html">Uploader.Queue</a></li>
<li><a href="../classes/UploaderFlash.html">UploaderFlash</a></li>
<li><a href="../classes/UploaderHTML5.html">UploaderHTML5</a></li>
<li><a href="../classes/ValueChange.html">ValueChange</a></li>
<li><a href="../classes/VerticalLegendLayout.html">VerticalLegendLayout</a></li>
<li><a href="../classes/View.html">View</a></li>
<li><a href="../classes/View.NodeMap.html">View.NodeMap</a></li>
<li><a href="../classes/VMLCircle.html">VMLCircle</a></li>
<li><a href="../classes/VMLDrawing.html">VMLDrawing</a></li>
<li><a href="../classes/VMLEllipse.html">VMLEllipse</a></li>
<li><a href="../classes/VMLGraphic.html">VMLGraphic</a></li>
<li><a href="../classes/VMLPath.html">VMLPath</a></li>
<li><a href="../classes/VMLPieSlice.html">VMLPieSlice</a></li>
<li><a href="../classes/VMLRect.html">VMLRect</a></li>
<li><a href="../classes/VMLShape.html">VMLShape</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
<li><a href="../classes/WidgetAutohide.html">WidgetAutohide</a></li>
<li><a href="../classes/WidgetButtons.html">WidgetButtons</a></li>
<li><a href="../classes/WidgetChild.html">WidgetChild</a></li>
<li><a href="../classes/WidgetModality.html">WidgetModality</a></li>
<li><a href="../classes/WidgetParent.html">WidgetParent</a></li>
<li><a href="../classes/WidgetPosition.html">WidgetPosition</a></li>
<li><a href="../classes/WidgetPositionAlign.html">WidgetPositionAlign</a></li>
<li><a href="../classes/WidgetPositionConstrain.html">WidgetPositionConstrain</a></li>
<li><a href="../classes/WidgetStack.html">WidgetStack</a></li>
<li><a href="../classes/WidgetStdMod.html">WidgetStdMod</a></li>
<li><a href="../classes/XML.html">XML</a></li>
<li><a href="../classes/YQL.html">YQL</a></li>
<li><a href="../classes/YQLRequest.html">YQLRequest</a></li>
<li><a href="../classes/YUI.html">YUI</a></li>
<li><a href="../classes/YUI~substitute.html">YUI~substitute</a></li>
</ul>
<ul id="api-modules" class="apis modules">
<li><a href="../modules/align-plugin.html">align-plugin</a></li>
<li><a href="../modules/anim.html">anim</a></li>
<li><a href="../modules/anim-base.html">anim-base</a></li>
<li><a href="../modules/anim-color.html">anim-color</a></li>
<li><a href="../modules/anim-curve.html">anim-curve</a></li>
<li><a href="../modules/anim-easing.html">anim-easing</a></li>
<li><a href="../modules/anim-node-plugin.html">anim-node-plugin</a></li>
<li><a href="../modules/anim-scroll.html">anim-scroll</a></li>
<li><a href="../modules/anim-shape.html">anim-shape</a></li>
<li><a href="../modules/anim-shape-transform.html">anim-shape-transform</a></li>
<li><a href="../modules/anim-xy.html">anim-xy</a></li>
<li><a href="../modules/app.html">app</a></li>
<li><a href="../modules/app-base.html">app-base</a></li>
<li><a href="../modules/app-content.html">app-content</a></li>
<li><a href="../modules/app-transitions.html">app-transitions</a></li>
<li><a href="../modules/app-transitions-native.html">app-transitions-native</a></li>
<li><a href="../modules/array-extras.html">array-extras</a></li>
<li><a href="../modules/array-invoke.html">array-invoke</a></li>
<li><a href="../modules/arraylist.html">arraylist</a></li>
<li><a href="../modules/arraylist-add.html">arraylist-add</a></li>
<li><a href="../modules/arraylist-filter.html">arraylist-filter</a></li>
<li><a href="../modules/arraysort.html">arraysort</a></li>
<li><a href="../modules/async-queue.html">async-queue</a></li>
<li><a href="../modules/attribute.html">attribute</a></li>
<li><a href="../modules/attribute-base.html">attribute-base</a></li>
<li><a href="../modules/attribute-complex.html">attribute-complex</a></li>
<li><a href="../modules/attribute-core.html">attribute-core</a></li>
<li><a href="../modules/attribute-extras.html">attribute-extras</a></li>
<li><a href="../modules/attribute-observable.html">attribute-observable</a></li>
<li><a href="../modules/autocomplete.html">autocomplete</a></li>
<li><a href="../modules/autocomplete-base.html">autocomplete-base</a></li>
<li><a href="../modules/autocomplete-filters.html">autocomplete-filters</a></li>
<li><a href="../modules/autocomplete-filters-accentfold.html">autocomplete-filters-accentfold</a></li>
<li><a href="../modules/autocomplete-highlighters.html">autocomplete-highlighters</a></li>
<li><a href="../modules/autocomplete-highlighters-accentfold.html">autocomplete-highlighters-accentfold</a></li>
<li><a href="../modules/autocomplete-list.html">autocomplete-list</a></li>
<li><a href="../modules/autocomplete-list-keys.html">autocomplete-list-keys</a></li>
<li><a href="../modules/autocomplete-plugin.html">autocomplete-plugin</a></li>
<li><a href="../modules/autocomplete-sources.html">autocomplete-sources</a></li>
<li><a href="../modules/axis.html">axis</a></li>
<li><a href="../modules/axis-base.html">axis-base</a></li>
<li><a href="../modules/axis-category.html">axis-category</a></li>
<li><a href="../modules/axis-category-base.html">axis-category-base</a></li>
<li><a href="../modules/axis-numeric.html">axis-numeric</a></li>
<li><a href="../modules/axis-numeric-base.html">axis-numeric-base</a></li>
<li><a href="../modules/axis-stacked.html">axis-stacked</a></li>
<li><a href="../modules/axis-stacked-base.html">axis-stacked-base</a></li>
<li><a href="../modules/axis-time.html">axis-time</a></li>
<li><a href="../modules/axis-time-base.html">axis-time-base</a></li>
<li><a href="../modules/base.html">base</a></li>
<li><a href="../modules/base-base.html">base-base</a></li>
<li><a href="../modules/base-build.html">base-build</a></li>
<li><a href="../modules/base-core.html">base-core</a></li>
<li><a href="../modules/base-observable.html">base-observable</a></li>
<li><a href="../modules/base-pluginhost.html">base-pluginhost</a></li>
<li><a href="../modules/button.html">button</a></li>
<li><a href="../modules/button-core.html">button-core</a></li>
<li><a href="../modules/button-group.html">button-group</a></li>
<li><a href="../modules/button-plugin.html">button-plugin</a></li>
<li><a href="../modules/cache.html">cache</a></li>
<li><a href="../modules/cache-base.html">cache-base</a></li>
<li><a href="../modules/cache-offline.html">cache-offline</a></li>
<li><a href="../modules/cache-plugin.html">cache-plugin</a></li>
<li><a href="../modules/calendar.html">calendar</a></li>
<li><a href="../modules/calendar-base.html">calendar-base</a></li>
<li><a href="../modules/calendarnavigator.html">calendarnavigator</a></li>
<li><a href="../modules/charts.html">charts</a></li>
<li><a href="../modules/charts-base.html">charts-base</a></li>
<li><a href="../modules/charts-legend.html">charts-legend</a></li>
<li><a href="../modules/classnamemanager.html">classnamemanager</a></li>
<li><a href="../modules/clickable-rail.html">clickable-rail</a></li>
<li><a href="../modules/collection.html">collection</a></li>
<li><a href="../modules/color.html">color</a></li>
<li><a href="../modules/color-base.html">color-base</a></li>
<li><a href="../modules/color-harmony.html">color-harmony</a></li>
<li><a href="../modules/color-hsl.html">color-hsl</a></li>
<li><a href="../modules/color-hsv.html">color-hsv</a></li>
<li><a href="../modules/console.html">console</a></li>
<li><a href="../modules/console-filters.html">console-filters</a></li>
<li><a href="../modules/cookie.html">cookie</a></li>
<li><a href="../modules/createlink-base.html">createlink-base</a></li>
<li><a href="../modules/dataschema.html">dataschema</a></li>
<li><a href="../modules/dataschema-array.html">dataschema-array</a></li>
<li><a href="../modules/dataschema-base.html">dataschema-base</a></li>
<li><a href="../modules/dataschema-json.html">dataschema-json</a></li>
<li><a href="../modules/dataschema-text.html">dataschema-text</a></li>
<li><a href="../modules/dataschema-xml.html">dataschema-xml</a></li>
<li><a href="../modules/datasource.html">datasource</a></li>
<li><a href="../modules/datasource-arrayschema.html">datasource-arrayschema</a></li>
<li><a href="../modules/datasource-cache.html">datasource-cache</a></li>
<li><a href="../modules/datasource-function.html">datasource-function</a></li>
<li><a href="../modules/datasource-get.html">datasource-get</a></li>
<li><a href="../modules/datasource-io.html">datasource-io</a></li>
<li><a href="../modules/datasource-jsonschema.html">datasource-jsonschema</a></li>
<li><a href="../modules/datasource-local.html">datasource-local</a></li>
<li><a href="../modules/datasource-polling.html">datasource-polling</a></li>
<li><a href="../modules/datasource-textschema.html">datasource-textschema</a></li>
<li><a href="../modules/datasource-xmlschema.html">datasource-xmlschema</a></li>
<li><a href="../modules/datatable.html">datatable</a></li>
<li><a href="../modules/datatable-base.html">datatable-base</a></li>
<li><a href="../modules/datatable-body.html">datatable-body</a></li>
<li><a href="../modules/datatable-column-widths.html">datatable-column-widths</a></li>
<li><a href="../modules/datatable-core.html">datatable-core</a></li>
<li><a href="../modules/datatable-datasource.html">datatable-datasource</a></li>
<li><a href="../modules/datatable-formatters.html">datatable-formatters</a></li>
<li><a href="../modules/datatable-head.html">datatable-head</a></li>
<li><a href="../modules/datatable-message.html">datatable-message</a></li>
<li><a href="../modules/datatable-mutable.html">datatable-mutable</a></li>
<li><a href="../modules/datatable-scroll.html">datatable-scroll</a></li>
<li><a href="../modules/datatable-sort.html">datatable-sort</a></li>
<li><a href="../modules/datatable-table.html">datatable-table</a></li>
<li><a href="../modules/datatype.html">datatype</a></li>
<li><a href="../modules/datatype-date.html">datatype-date</a></li>
<li><a href="../modules/datatype-date-format.html">datatype-date-format</a></li>
<li><a href="../modules/datatype-date-math.html">datatype-date-math</a></li>
<li><a href="../modules/datatype-date-parse.html">datatype-date-parse</a></li>
<li><a href="../modules/datatype-number.html">datatype-number</a></li>
<li><a href="../modules/datatype-number-format.html">datatype-number-format</a></li>
<li><a href="../modules/datatype-number-parse.html">datatype-number-parse</a></li>
<li><a href="../modules/datatype-xml.html">datatype-xml</a></li>
<li><a href="../modules/datatype-xml-format.html">datatype-xml-format</a></li>
<li><a href="../modules/datatype-xml-parse.html">datatype-xml-parse</a></li>
<li><a href="../modules/dd.html">dd</a></li>
<li><a href="../modules/dd-constrain.html">dd-constrain</a></li>
<li><a href="../modules/dd-ddm.html">dd-ddm</a></li>
<li><a href="../modules/dd-ddm-base.html">dd-ddm-base</a></li>
<li><a href="../modules/dd-ddm-drop.html">dd-ddm-drop</a></li>
<li><a href="../modules/dd-delegate.html">dd-delegate</a></li>
<li><a href="../modules/dd-drag.html">dd-drag</a></li>
<li><a href="../modules/dd-drop.html">dd-drop</a></li>
<li><a href="../modules/dd-drop-plugin.html">dd-drop-plugin</a></li>
<li><a href="../modules/dd-gestures.html">dd-gestures</a></li>
<li><a href="../modules/dd-plugin.html">dd-plugin</a></li>
<li><a href="../modules/dd-proxy.html">dd-proxy</a></li>
<li><a href="../modules/dd-scroll.html">dd-scroll</a></li>
<li><a href="../modules/dial.html">dial</a></li>
<li><a href="../modules/dom.html">dom</a></li>
<li><a href="../modules/dom-base.html">dom-base</a></li>
<li><a href="../modules/dom-screen.html">dom-screen</a></li>
<li><a href="../modules/dom-style.html">dom-style</a></li>
<li><a href="../modules/dump.html">dump</a></li>
<li><a href="../modules/editor.html">editor</a></li>
<li><a href="../modules/editor-base.html">editor-base</a></li>
<li><a href="../modules/editor-bidi.html">editor-bidi</a></li>
<li><a href="../modules/editor-br.html">editor-br</a></li>
<li><a href="../modules/editor-lists.html">editor-lists</a></li>
<li><a href="../modules/editor-para.html">editor-para</a></li>
<li><a href="../modules/editor-para-base.html">editor-para-base</a></li>
<li><a href="../modules/editor-para-ie.html">editor-para-ie</a></li>
<li><a href="../modules/editor-tab.html">editor-tab</a></li>
<li><a href="../modules/escape.html">escape</a></li>
<li><a href="../modules/event.html">event</a></li>
<li><a href="../modules/event-base.html">event-base</a></li>
<li><a href="../modules/event-contextmenu.html">event-contextmenu</a></li>
<li><a href="../modules/event-custom.html">event-custom</a></li>
<li><a href="../modules/event-custom-base.html">event-custom-base</a></li>
<li><a href="../modules/event-custom-complex.html">event-custom-complex</a></li>
<li><a href="../modules/event-delegate.html">event-delegate</a></li>
<li><a href="../modules/event-flick.html">event-flick</a></li>
<li><a href="../modules/event-focus.html">event-focus</a></li>
<li><a href="../modules/event-gestures.html">event-gestures</a></li>
<li><a href="../modules/event-hover.html">event-hover</a></li>
<li><a href="../modules/event-key.html">event-key</a></li>
<li><a href="../modules/event-mouseenter.html">event-mouseenter</a></li>
<li><a href="../modules/event-mousewheel.html">event-mousewheel</a></li>
<li><a href="../modules/event-move.html">event-move</a></li>
<li><a href="../modules/event-outside.html">event-outside</a></li>
<li><a href="../modules/event-resize.html">event-resize</a></li>
<li><a href="../modules/event-simulate.html">event-simulate</a></li>
<li><a href="../modules/event-synthetic.html">event-synthetic</a></li>
<li><a href="../modules/event-tap.html">event-tap</a></li>
<li><a href="../modules/event-touch.html">event-touch</a></li>
<li><a href="../modules/event-valuechange.html">event-valuechange</a></li>
<li><a href="../modules/exec-command.html">exec-command</a></li>
<li><a href="../modules/features.html">features</a></li>
<li><a href="../modules/file.html">file</a></li>
<li><a href="../modules/file-flash.html">file-flash</a></li>
<li><a href="../modules/file-html5.html">file-html5</a></li>
<li><a href="../modules/frame.html">frame</a></li>
<li><a href="../modules/gesture-simulate.html">gesture-simulate</a></li>
<li><a href="../modules/get.html">get</a></li>
<li><a href="../modules/get-nodejs.html">get-nodejs</a></li>
<li><a href="../modules/graphics.html">graphics</a></li>
<li><a href="../modules/graphics-group.html">graphics-group</a></li>
<li><a href="../modules/handlebars.html">handlebars</a></li>
<li><a href="../modules/handlebars-base.html">handlebars-base</a></li>
<li><a href="../modules/handlebars-compiler.html">handlebars-compiler</a></li>
<li><a href="../modules/highlight.html">highlight</a></li>
<li><a href="../modules/highlight-accentfold.html">highlight-accentfold</a></li>
<li><a href="../modules/highlight-base.html">highlight-base</a></li>
<li><a href="../modules/history.html">history</a></li>
<li><a href="../modules/history-base.html">history-base</a></li>
<li><a href="../modules/history-hash.html">history-hash</a></li>
<li><a href="../modules/history-hash-ie.html">history-hash-ie</a></li>
<li><a href="../modules/history-html5.html">history-html5</a></li>
<li><a href="../modules/imageloader.html">imageloader</a></li>
<li><a href="../modules/intl.html">intl</a></li>
<li><a href="../modules/io.html">io</a></li>
<li><a href="../modules/io-base.html">io-base</a></li>
<li><a href="../modules/io-form.html">io-form</a></li>
<li><a href="../modules/io-nodejs.html">io-nodejs</a></li>
<li><a href="../modules/io-queue.html">io-queue</a></li>
<li><a href="../modules/io-upload-iframe.html">io-upload-iframe</a></li>
<li><a href="../modules/io-xdr.html">io-xdr</a></li>
<li><a href="../modules/json.html">json</a></li>
<li><a href="../modules/json-parse.html">json-parse</a></li>
<li><a href="../modules/json-stringify.html">json-stringify</a></li>
<li><a href="../modules/jsonp.html">jsonp</a></li>
<li><a href="../modules/jsonp-url.html">jsonp-url</a></li>
<li><a href="../modules/lazy-model-list.html">lazy-model-list</a></li>
<li><a href="../modules/loader.html">loader</a></li>
<li><a href="../modules/loader-base.html">loader-base</a></li>
<li><a href="../modules/loader-yui3.html">loader-yui3</a></li>
<li><a href="../modules/matrix.html">matrix</a></li>
<li><a href="../modules/model.html">model</a></li>
<li><a href="../modules/model-list.html">model-list</a></li>
<li><a href="../modules/model-sync-rest.html">model-sync-rest</a></li>
<li><a href="../modules/node.html">node</a></li>
<li><a href="../modules/node-base.html">node-base</a></li>
<li><a href="../modules/node-core.html">node-core</a></li>
<li><a href="../modules/node-data.html">node-data</a></li>
<li><a href="../modules/node-event-delegate.html">node-event-delegate</a></li>
<li><a href="../modules/node-event-html5.html">node-event-html5</a></li>
<li><a href="../modules/node-event-simulate.html">node-event-simulate</a></li>
<li><a href="../modules/node-flick.html">node-flick</a></li>
<li><a href="../modules/node-focusmanager.html">node-focusmanager</a></li>
<li><a href="../modules/node-load.html">node-load</a></li>
<li><a href="../modules/node-menunav.html">node-menunav</a></li>
<li><a href="../modules/node-pluginhost.html">node-pluginhost</a></li>
<li><a href="../modules/node-screen.html">node-screen</a></li>
<li><a href="../modules/node-scroll-info.html">node-scroll-info</a></li>
<li><a href="../modules/node-style.html">node-style</a></li>
<li><a href="../modules/oop.html">oop</a></li>
<li><a href="../modules/overlay.html">overlay</a></li>
<li><a href="../modules/panel.html">panel</a></li>
<li><a href="../modules/parallel.html">parallel</a></li>
<li><a href="../modules/pjax.html">pjax</a></li>
<li><a href="../modules/pjax-base.html">pjax-base</a></li>
<li><a href="../modules/pjax-content.html">pjax-content</a></li>
<li><a href="../modules/pjax-plugin.html">pjax-plugin</a></li>
<li><a href="../modules/plugin.html">plugin</a></li>
<li><a href="../modules/pluginhost.html">pluginhost</a></li>
<li><a href="../modules/pluginhost-base.html">pluginhost-base</a></li>
<li><a href="../modules/pluginhost-config.html">pluginhost-config</a></li>
<li><a href="../modules/promise.html">promise</a></li>
<li><a href="../modules/querystring.html">querystring</a></li>
<li><a href="../modules/querystring-parse.html">querystring-parse</a></li>
<li><a href="../modules/querystring-parse-simple.html">querystring-parse-simple</a></li>
<li><a href="../modules/querystring-stringify.html">querystring-stringify</a></li>
<li><a href="../modules/querystring-stringify-simple.html">querystring-stringify-simple</a></li>
<li><a href="../modules/queue-promote.html">queue-promote</a></li>
<li><a href="../modules/range-slider.html">range-slider</a></li>
<li><a href="../modules/recordset.html">recordset</a></li>
<li><a href="../modules/recordset-base.html">recordset-base</a></li>
<li><a href="../modules/recordset-filter.html">recordset-filter</a></li>
<li><a href="../modules/recordset-indexer.html">recordset-indexer</a></li>
<li><a href="../modules/recordset-sort.html">recordset-sort</a></li>
<li><a href="../modules/resize.html">resize</a></li>
<li><a href="../modules/resize-contrain.html">resize-contrain</a></li>
<li><a href="../modules/resize-plugin.html">resize-plugin</a></li>
<li><a href="../modules/resize-proxy.html">resize-proxy</a></li>
<li><a href="../modules/rollup.html">rollup</a></li>
<li><a href="../modules/router.html">router</a></li>
<li><a href="../modules/scrollview.html">scrollview</a></li>
<li><a href="../modules/scrollview-base.html">scrollview-base</a></li>
<li><a href="../modules/scrollview-base-ie.html">scrollview-base-ie</a></li>
<li><a href="../modules/scrollview-list.html">scrollview-list</a></li>
<li><a href="../modules/scrollview-paginator.html">scrollview-paginator</a></li>
<li><a href="../modules/scrollview-scrollbars.html">scrollview-scrollbars</a></li>
<li><a href="../modules/selection.html">selection</a></li>
<li><a href="../modules/selector-css2.html">selector-css2</a></li>
<li><a href="../modules/selector-css3.html">selector-css3</a></li>
<li><a href="../modules/selector-native.html">selector-native</a></li>
<li><a href="../modules/series-area.html">series-area</a></li>
<li><a href="../modules/series-area-stacked.html">series-area-stacked</a></li>
<li><a href="../modules/series-areaspline.html">series-areaspline</a></li>
<li><a href="../modules/series-areaspline-stacked.html">series-areaspline-stacked</a></li>
<li><a href="../modules/series-bar.html">series-bar</a></li>
<li><a href="../modules/series-bar-stacked.html">series-bar-stacked</a></li>
<li><a href="../modules/series-base.html">series-base</a></li>
<li><a href="../modules/series-candlestick.html">series-candlestick</a></li>
<li><a href="../modules/series-cartesian.html">series-cartesian</a></li>
<li><a href="../modules/series-column.html">series-column</a></li>
<li><a href="../modules/series-column-stacked.html">series-column-stacked</a></li>
<li><a href="../modules/series-combo.html">series-combo</a></li>
<li><a href="../modules/series-combo-stacked.html">series-combo-stacked</a></li>
<li><a href="../modules/series-combospline.html">series-combospline</a></li>
<li><a href="../modules/series-combospline-stacked.html">series-combospline-stacked</a></li>
<li><a href="../modules/series-curve-util.html">series-curve-util</a></li>
<li><a href="../modules/series-fill-util.html">series-fill-util</a></li>
<li><a href="../modules/series-histogram.html">series-histogram</a></li>
<li><a href="../modules/series-line.html">series-line</a></li>
<li><a href="../modules/series-line-stacked.html">series-line-stacked</a></li>
<li><a href="../modules/series-line-util.html">series-line-util</a></li>
<li><a href="../modules/series-marker.html">series-marker</a></li>
<li><a href="../modules/series-marker-stacked.html">series-marker-stacked</a></li>
<li><a href="../modules/series-ohlc.html">series-ohlc</a></li>
<li><a href="../modules/series-pie.html">series-pie</a></li>
<li><a href="../modules/series-plot-util.html">series-plot-util</a></li>
<li><a href="../modules/series-range.html">series-range</a></li>
<li><a href="../modules/series-spline.html">series-spline</a></li>
<li><a href="../modules/series-spline-stacked.html">series-spline-stacked</a></li>
<li><a href="../modules/series-stacked.html">series-stacked</a></li>
<li><a href="../modules/shim-plugin.html">shim-plugin</a></li>
<li><a href="../modules/slider.html">slider</a></li>
<li><a href="../modules/slider-base.html">slider-base</a></li>
<li><a href="../modules/slider-value-range.html">slider-value-range</a></li>
<li><a href="../modules/sortable.html">sortable</a></li>
<li><a href="../modules/sortable-scroll.html">sortable-scroll</a></li>
<li><a href="../modules/stylesheet.html">stylesheet</a></li>
<li><a href="../modules/substitute.html">substitute</a></li>
<li><a href="../modules/swf.html">swf</a></li>
<li><a href="../modules/swfdetect.html">swfdetect</a></li>
<li><a href="../modules/tabview.html">tabview</a></li>
<li><a href="../modules/template.html">template</a></li>
<li><a href="../modules/template-base.html">template-base</a></li>
<li><a href="../modules/template-micro.html">template-micro</a></li>
<li><a href="../modules/test.html">test</a></li>
<li><a href="../modules/test-console.html">test-console</a></li>
<li><a href="../modules/text.html">text</a></li>
<li><a href="../modules/text-accentfold.html">text-accentfold</a></li>
<li><a href="../modules/text-wordbreak.html">text-wordbreak</a></li>
<li><a href="../modules/timers.html">timers</a></li>
<li><a href="../modules/transition.html">transition</a></li>
<li><a href="../modules/transition-timer.html">transition-timer</a></li>
<li><a href="../modules/tree.html">tree</a></li>
<li><a href="../modules/tree-labelable.html">tree-labelable</a></li>
<li><a href="../modules/tree-lazy.html">tree-lazy</a></li>
<li><a href="../modules/tree-node.html">tree-node</a></li>
<li><a href="../modules/tree-openable.html">tree-openable</a></li>
<li><a href="../modules/tree-selectable.html">tree-selectable</a></li>
<li><a href="../modules/tree-sortable.html">tree-sortable</a></li>
<li><a href="../modules/uploader.html">uploader</a></li>
<li><a href="../modules/uploader-flash.html">uploader-flash</a></li>
<li><a href="../modules/uploader-html5.html">uploader-html5</a></li>
<li><a href="../modules/uploader-queue.html">uploader-queue</a></li>
<li><a href="../modules/view.html">view</a></li>
<li><a href="../modules/view-node-map.html">view-node-map</a></li>
<li><a href="../modules/widget.html">widget</a></li>
<li><a href="../modules/widget-anim.html">widget-anim</a></li>
<li><a href="../modules/widget-autohide.html">widget-autohide</a></li>
<li><a href="../modules/widget-base.html">widget-base</a></li>
<li><a href="../modules/widget-base-ie.html">widget-base-ie</a></li>
<li><a href="../modules/widget-buttons.html">widget-buttons</a></li>
<li><a href="../modules/widget-child.html">widget-child</a></li>
<li><a href="../modules/widget-htmlparser.html">widget-htmlparser</a></li>
<li><a href="../modules/widget-locale.html">widget-locale</a></li>
<li><a href="../modules/widget-modality.html">widget-modality</a></li>
<li><a href="../modules/widget-parent.html">widget-parent</a></li>
<li><a href="../modules/widget-position.html">widget-position</a></li>
<li><a href="../modules/widget-position-align.html">widget-position-align</a></li>
<li><a href="../modules/widget-position-constrain.html">widget-position-constrain</a></li>
<li><a href="../modules/widget-skin.html">widget-skin</a></li>
<li><a href="../modules/widget-stack.html">widget-stack</a></li>
<li><a href="../modules/widget-stdmod.html">widget-stdmod</a></li>
<li><a href="../modules/widget-uievents.html">widget-uievents</a></li>
<li><a href="../modules/yql.html">yql</a></li>
<li><a href="../modules/yql-jsonp.html">yql-jsonp</a></li>
<li><a href="../modules/yql-nodejs.html">yql-nodejs</a></li>
<li><a href="../modules/yql-winjs.html">yql-winjs</a></li>
<li><a href="../modules/yui.html">yui</a></li>
<li><a href="../modules/yui-base.html">yui-base</a></li>
<li><a href="../modules/yui-later.html">yui-later</a></li>
<li><a href="../modules/yui-log.html">yui-log</a></li>
<li><a href="../modules/yui-throttle.html">yui-throttle</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>ModelSync.REST Class</h1>
<div class="box meta">
<div class="foundat">
Defined in: <a href="../files/app_js_model-extensions_model-sync-rest.js.html#l12"><code>app/js/model-extensions/model-sync-rest.js:12</code></a>
</div>
Module: <a href="../modules/model-sync-rest.html">model-sync-rest</a><br>
Parent Module: <a href="../modules/app.html">app</a>
<p>Available since 3.6.0</p>
</div>
<div class="box intro">
<p>An extension which provides a RESTful XHR sync implementation that can be mixed
into a Model or ModelList subclass.</p>
<p>This makes it trivial for your Model or ModelList subclasses communicate and
transmit their data via RESTful XHRs. In most cases you'll only need to provide
a value for <code>root</code> when sub-classing <code>Y.Model</code>.</p>
<pre class="code prettyprint"><code>Y.User = Y.Base.create('user', Y.Model, [Y.ModelSync.REST], {
root: '/users'
});
Y.Users = Y.Base.create('users', Y.ModelList, [Y.ModelSync.REST], {
// By convention <code>Y.User</code>'s <code>root</code> will be used for the lists' URL.
model: Y.User
});
var users = new Y.Users();
// GET users list from: "/users"
users.load(function () {
var firstUser = users.item(0);
firstUser.get('id'); // => "1"
// PUT updated user data at: "/users/1"
firstUser.set('name', 'Eric').save();
});
</code></pre>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
<div class="index-section methods">
<h3>Methods</h3>
<ul class="index-list methods">
<li class="index-item method protected">
<a href="#method__joinURL">_joinURL</a>
</li>
<li class="index-item method protected">
<a href="#method__onSyncIOEnd">_onSyncIOEnd</a>
</li>
<li class="index-item method protected">
<a href="#method__onSyncIOFailure">_onSyncIOFailure</a>
</li>
<li class="index-item method protected">
<a href="#method__onSyncIOStart">_onSyncIOStart</a>
</li>
<li class="index-item method protected">
<a href="#method__onSyncIOSuccess">_onSyncIOSuccess</a>
</li>
<li class="index-item method protected">
<a href="#method__parse">_parse</a>
</li>
<li class="index-item method protected">
<a href="#method__sendSyncIORequest">_sendSyncIORequest</a>
</li>
<li class="index-item method protected">
<a href="#method__substituteURL">_substituteURL</a>
</li>
<li class="index-item method">
<a href="#method_getURL">getURL</a>
</li>
<li class="index-item method">
<a href="#method_parseIOResponse">parseIOResponse</a>
</li>
<li class="index-item method">
<a href="#method_serialize">serialize</a>
</li>
<li class="index-item method">
<a href="#method_sync">sync</a>
</li>
</ul>
</div>
<div class="index-section properties">
<h3>Properties</h3>
<ul class="index-list properties">
<li class="index-item property protected">
<a href="#property__NON_ATTRS_CFG">_NON_ATTRS_CFG</a>
<span class="flag static">static</span>
</li>
<li class="index-item property">
<a href="#property_CSRF_TOKEN">CSRF_TOKEN</a>
<span class="flag static">static</span>
</li>
<li class="index-item property">
<a href="#property_EMULATE_HTTP">EMULATE_HTTP</a>
<span class="flag static">static</span>
</li>
<li class="index-item property">
<a href="#property_HTTP_HEADERS">HTTP_HEADERS</a>
<span class="flag static">static</span>
</li>
<li class="index-item property">
<a href="#property_HTTP_METHODS">HTTP_METHODS</a>
<span class="flag static">static</span>
</li>
<li class="index-item property">
<a href="#property_HTTP_TIMEOUT">HTTP_TIMEOUT</a>
<span class="flag static">static</span>
</li>
<li class="index-item property">
<a href="#property_root">root</a>
</li>
<li class="index-item property">
<a href="#property_url">url</a>
</li>
</ul>
</div>
</div>
<div id="methods" class="api-class-tabpanel">
<h2 class="off-left">Methods</h2>
<div id="method__joinURL" class="method item protected">
<h3 class="name"><code>_joinURL</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>url</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
</span>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l496"><code>app/js/model-extensions/model-sync-rest.js:496</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Joins the <code>root</code> URL to the specified <code>url</code>, normalizing leading/trailing
"/" characters.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">url</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>URL to append to the <code>root</code> URL.</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
Joined URL.
</div>
</div>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<pre class="code prettyprint"><code>model.root = '/foo'
model._joinURL('bar'); // => '/foo/bar'
model._joinURL('/bar'); // => '/foo/bar'
model.root = '/foo/'
model._joinURL('bar'); // => '/foo/bar/'
model._joinURL('/bar'); // => '/foo/bar/'
</code></pre>
</div>
</div>
</div>
<div id="method__onSyncIOEnd" class="method item protected">
<h3 class="name"><code>_onSyncIOEnd</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>txId</code>
</li>
<li class="arg">
<code>details</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l641"><code>app/js/model-extensions/model-sync-rest.js:641</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Called when the <code>Y.io</code> request has finished, after "success" or "failure"
has been determined.</p>
<p>This is a no-op by default, but provides a hook for overriding.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">txId</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The <code>Y.io</code> transaction id.</p>
</div>
</li>
<li class="param">
<code class="param-name">details</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>Extra details carried through from <code>sync()</code>:</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name">action</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The sync action performed.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[callback]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The function to call after syncing.</p>
</div>
</li>
<li class="param">
<code class="param-name">url</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The URL of the requested resource.</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="method__onSyncIOFailure" class="method item protected">
<h3 class="name"><code>_onSyncIOFailure</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>txId</code>
</li>
<li class="arg">
<code>res</code>
</li>
<li class="arg">
<code>details</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l658"><code>app/js/model-extensions/model-sync-rest.js:658</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Called when the <code>Y.io</code> request has finished unsuccessfully.</p>
<p>By default this calls the <code>details.callback</code> function passing it the HTTP
status code and message as an error object along with the response body.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">txId</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The <code>Y.io</code> transaction id.</p>
</div>
</li>
<li class="param">
<code class="param-name">res</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>The <code>Y.io</code> response object.</p>
</div>
</li>
<li class="param">
<code class="param-name">details</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>Extra details carried through from <code>sync()</code>:</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name">action</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The sync action performed.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[callback]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The function to call after syncing.</p>
</div>
</li>
<li class="param">
<code class="param-name">url</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The URL of the requested resource.</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="method__onSyncIOStart" class="method item protected">
<h3 class="name"><code>_onSyncIOStart</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>txId</code>
</li>
<li class="arg">
<code>details</code>
</li>
<li class="arg">
<code>detials.action</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l709"><code>app/js/model-extensions/model-sync-rest.js:709</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Called when the <code>Y.io</code> request is made.</p>
<p>This is a no-op by default, but provides a hook for overriding.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">txId</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The <code>Y.io</code> transaction id.</p>
</div>
</li>
<li class="param">
<code class="param-name">details</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>Extra details carried through from <code>sync()</code>:</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name optional">[callback]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The function to call after syncing.</p>
</div>
</li>
<li class="param">
<code class="param-name">url</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The URL of the requested resource.</p>
</div>
</li>
</ul>
</li>
<li class="param">
<code class="param-name">detials.action</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The sync action performed.</p>
</div>
</li>
</ul>
</div>
</div>
<div id="method__onSyncIOSuccess" class="method item protected">
<h3 class="name"><code>_onSyncIOSuccess</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>txId</code>
</li>
<li class="arg">
<code>res</code>
</li>
<li class="arg">
<code>details</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l685"><code>app/js/model-extensions/model-sync-rest.js:685</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Called when the <code>Y.io</code> request has finished successfully.</p>
<p>By default this calls the <code>details.callback</code> function passing it the
response body.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">txId</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The <code>Y.io</code> transaction id.</p>
</div>
</li>
<li class="param">
<code class="param-name">res</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>The <code>Y.io</code> response object.</p>
</div>
</li>
<li class="param">
<code class="param-name">details</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>Extra details carried through from <code>sync()</code>:</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name">action</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The sync action performed.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[callback]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The function to call after syncing.</p>
</div>
</li>
<li class="param">
<code class="param-name">url</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The URL of the requested resource.</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="method__parse" class="method item protected">
<h3 class="name"><code>_parse</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>response</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object[]</a></span>
</span>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l534"><code>app/js/model-extensions/model-sync-rest.js:534</code></a>
</p>
<p>Available since 3.7.0</p>
</div>
<div class="description">
<p>Calls both public, overrideable methods: <code>parseIOResponse()</code>, then <code>parse()</code>
and returns the result.</p>
<p>This will call into <code>parseIOResponse()</code>, if it's defined as a method,
passing it the full response object from the XHR and using its return value
to pass along to the <code>parse()</code>. This enables developers to easily parse data
out of the response headers which should be used by the <code>parse()</code> method.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">response</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>Response object from <code>Y.io()</code>.</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object[]</a></span>:
Attribute hash or Array of model attribute hashes.
</div>
</div>
</div>
<div id="method__sendSyncIORequest" class="method item protected">
<h3 class="name"><code>_sendSyncIORequest</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>config</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
</span>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l560"><code>app/js/model-extensions/model-sync-rest.js:560</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Performs the XHR and returns the resulting <code>Y.io()</code> request object.</p>
<p>This method is called by <code>sync()</code>.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">config</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>An object with the following properties:</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name">action</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The <code>sync()</code> action being performed.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[callback]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Called when the sync operation
finishes.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[entity]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The HTTP request entity body.</p>
</div>
</li>
<li class="param">
<code class="param-name">headers</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>The HTTP request headers.</p>
</div>
</li>
<li class="param">
<code class="param-name">method</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The HTTP request method.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[timeout]</code>
<span class="type"><a href="../classes/Number.html" class="crosslink">Number</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Time until the HTTP request is aborted.</p>
</div>
</li>
<li class="param">
<code class="param-name">url</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>The URL of the HTTP resource.</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
The resulting <code>Y.io()</code> request object.
</div>
</div>
</div>
<div id="method__substituteURL" class="method item protected">
<h3 class="name"><code>_substituteURL</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>url</code>
</li>
<li class="arg">
<code>data</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
</span>
<span class="flag protected">protected</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l602"><code>app/js/model-extensions/model-sync-rest.js:602</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Utility which takes a tokenized <code>url</code> string and substitutes its
placeholders using a specified <code>data</code> object.</p>
<p>This method will property URL-encode any values before substituting them.
Also, only expect it to work with String and Number values.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">url</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>Tokenized URL string to substitute placeholder values.</p>
</div>
</li>
<li class="param">
<code class="param-name">data</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>Set of data to fill in the <code>url</code>'s placeholders.</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
Substituted URL.
</div>
</div>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<pre class="code prettyprint"><code>var url = this._substituteURL('/users/{name}', {id: 'Eric F'});
// => "/users/Eric%20F"
</code></pre>
</div>
</div>
</div>
<div id="method_getURL" class="method item">
<h3 class="name"><code>getURL</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code class="optional">[action]</code>
</li>
<li class="arg">
<code class="optional">[options]</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l310"><code>app/js/model-extensions/model-sync-rest.js:310</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Returns the URL for this model or model list for the given <code>action</code> and
<code>options</code>, if specified.</p>
<p>This method correctly handles the variations of <code>root</code> and <code>url</code> values and
is called by the <code>sync()</code> method to get the URLs used to make the XHRs.</p>
<p>You can override this method if you need to provide a specific
implementation for how the URLs of your Model and ModelList subclasses need
to be generated.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name optional">[action]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Optional <code>sync()</code> action for which to generate the
URL.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[options]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Optional options which may be used to help
generate the URL.</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
this model's or model list's URL for the the given
<code>action</code> and <code>options</code>.
</div>
</div>
</div>
<div id="method_parseIOResponse" class="method item">
<h3 class="name"><code>parseIOResponse</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>response</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type">Any</span>
</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l366"><code>app/js/model-extensions/model-sync-rest.js:366</code></a>
</p>
<p>Available since 3.7.0</p>
</div>
<div class="description">
<p>Called to parse the response object returned from <code>Y.io()</code>. This method
receives the full response object and is expected to "prep" a response which
is suitable to pass to the <code>parse()</code> method.</p>
<p>By default the response body is returned (<code>responseText</code>), because it
usually represents the entire entity of this model on the server.</p>
<p>If you need to parse data out of the response's headers you should do so by
overriding this method. If you'd like the entire response object from the
XHR to be passed to your <code>parse()</code> method, you can simply assign this
property to <code>false</code>.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">response</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<div class="param-description">
<p>Response object from <code>Y.io()</code>.</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Any</span>:
The modified response to pass along to the <code>parse()</code> method.
</div>
</div>
</div>
<div id="method_serialize" class="method item">
<h3 class="name"><code>serialize</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code class="optional">[action]</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l388"><code>app/js/model-extensions/model-sync-rest.js:388</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Serializes <code>this</code> model to be used as the HTTP request entity body.</p>
<p>By default this model will be serialized to a JSON string via its <code>toJSON()</code>
method.</p>
<p>You can override this method when the HTTP server expects a different
representation of this model's data that is different from the default JSON
serialization. If you're sending and receive content other than JSON, be
sure change the <code>Accept</code> and <code>Content-Type</code> <code>HTTP_HEADERS</code> as well.</p>
<p><strong>Note:</strong> A model's <code>toJSON()</code> method can also be overridden. If you only
need to modify which attributes are serialized to JSON, that's a better
place to start.</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name optional">[action]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Optional <code>sync()</code> action for which to generate the
the serialized representation of this model.</p>
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
serialized HTTP request entity body.
</div>
</div>
</div>
<div id="method_sync" class="method item">
<h3 class="name"><code>sync</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>action</code>
</li>
<li class="arg">
<code class="optional">[options]</code>
</li>
<li class="arg">
<code class="optional">[callback]</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l413"><code>app/js/model-extensions/model-sync-rest.js:413</code></a>
</p>
</div>
<div class="description">
<p>Communicates with a RESTful HTTP server by sending and receiving data via
XHRs. This method is called internally by load(), save(), and destroy().</p>
<p>The URL used for each XHR will be retrieved by calling the <code>getURL()</code> method
and passing it the specified <code>action</code> and <code>options</code>.</p>
<p>This method relies heavily on standard RESTful HTTP conventions</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">action</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="param-description">
<p>Sync action to perform. May be one of the following:</p>
<ul>
<li><code>create</code>: Store a newly-created model for the first time.</li>
<li><code>delete</code>: Delete an existing model.</li>
<li><code>read</code> : Load an existing model.</li>
<li><code>update</code>: Update an existing model.</li>
</ul>
</div>
</li>
<li class="param">
<code class="param-name optional">[options]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Sync options:</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name optional">[csrfToken]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The authenticity token used by the
server to verify the validity of this request and protected against CSRF
attacks. This overrides the default value provided by the static
<code>CSRF_TOKEN</code> property.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[headers]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The HTTP headers to mix with the default
headers specified by the static <code>HTTP_HEADERS</code> property.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[timeout]</code>
<span class="type"><a href="../classes/Number.html" class="crosslink">Number</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The number of milliseconds before the
request will timeout and be aborted. This overrides the default provided
by the static <code>HTTP_TIMEOUT</code> property.</p>
</div>
</li>
</ul>
</li>
<li class="param">
<code class="param-name optional">[callback]</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Called when the sync operation finishes.</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name">err</code>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error" class="crosslink external" target="_blank">Error</a> | Null</span>
<div class="param-description">
<p>If an error occurred, this parameter will
contain the error. If the sync operation succeeded, <em>err</em> will be
falsy.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[response]</code>
<span class="type">Any</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>The server's response.</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div id="properties" class="api-class-tabpanel">
<h2 class="off-left">Properties</h2>
<div id="property__NON_ATTRS_CFG" class="property item protected">
<h3 class="name"><code>_NON_ATTRS_CFG</code></h3>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
<span class="flag protected">protected</span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l155"><code>app/js/model-extensions/model-sync-rest.js:155</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Properties that shouldn't be turned into ad-hoc attributes when passed to a
Model or ModelList constructor.</p>
</div>
<p><strong>Default:</strong> ["root", "url"]</p>
</div>
<div id="property_CSRF_TOKEN" class="property item">
<h3 class="name"><code>CSRF_TOKEN</code></h3>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l48"><code>app/js/model-extensions/model-sync-rest.js:48</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>A request authenticity token to validate HTTP requests made by this extension
with the server when the request results in changing persistent state. This
allows you to protect your server from Cross-Site Request Forgery attacks.</p>
<p>A CSRF token provided by the server can be embedded in the HTML document and
assigned to <code>YUI.Env.CSRF_TOKEN</code> like this:</p>
<pre class="code prettyprint"><code><script>
YUI.Env.CSRF_TOKEN = {{session.authenticityToken}};
</script>
</code></pre>
<p>The above should come after YUI seed file so that <code>YUI.Env</code> will be defined.</p>
<p><strong>Note:</strong> This can be overridden on a per-request basis. See <code>sync()</code> method.</p>
<p>When a value for the CSRF token is provided, either statically or via <code>options</code>
passed to the <code>save()</code> and <code>destroy()</code> methods, the applicable HTTP requests
will have a <code>X-CSRF-Token</code> header added with the token value.</p>
</div>
<p><strong>Default:</strong> YUI.Env.CSRF_TOKEN</p>
</div>
<div id="property_EMULATE_HTTP" class="property item">
<h3 class="name"><code>EMULATE_HTTP</code></h3>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l76"><code>app/js/model-extensions/model-sync-rest.js:76</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Static flag to use the HTTP POST method instead of PUT or DELETE.</p>
<p>If the server-side HTTP framework isn't RESTful, setting this flag to <code>true</code>
will cause all PUT and DELETE requests to instead use the POST HTTP method, and
add a <code>X-HTTP-Method-Override</code> HTTP header with the value of the method type
which was overridden.</p>
</div>
<p><strong>Default:</strong> false</p>
</div>
<div id="property_HTTP_HEADERS" class="property item">
<h3 class="name"><code>HTTP_HEADERS</code></h3>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l92"><code>app/js/model-extensions/model-sync-rest.js:92</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Default headers used with all XHRs.</p>
<p>By default the <code>Accept</code> and <code>Content-Type</code> headers are set to
"application/json", this signals to the HTTP server to process the request
bodies as JSON and send JSON responses. If you're sending and receiving content
other than JSON, you can override these headers and the <code>parse()</code> and
<code>serialize()</code> methods.</p>
<p><strong>Note:</strong> These headers will be merged with any request-specific headers, and
the request-specific headers will take precedence.</p>
</div>
<p><strong>Default:</strong> {
"Accept" : "application/json",
"Content-Type": "application/json"
}</p>
</div>
<div id="property_HTTP_METHODS" class="property item">
<h3 class="name"><code>HTTP_METHODS</code></h3>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l119"><code>app/js/model-extensions/model-sync-rest.js:119</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>Static mapping of RESTful HTTP methods corresponding to CRUD actions.</p>
</div>
<p><strong>Default:</strong> {
"create": "POST",
"read" : "GET",
"update": "PUT",
"delete": "DELETE"
}</p>
</div>
<div id="property_HTTP_TIMEOUT" class="property item">
<h3 class="name"><code>HTTP_TIMEOUT</code></h3>
<span class="type"><a href="../classes/Number.html" class="crosslink">Number</a></span>
<span class="flag static">static</span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l141"><code>app/js/model-extensions/model-sync-rest.js:141</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>The number of milliseconds before the XHRs will timeout/abort. This defaults to
30 seconds.</p>
<p><strong>Note:</strong> This can be overridden on a per-request basis. See <code>sync()</code> method.</p>
</div>
<p><strong>Default:</strong> 30000</p>
</div>
<div id="property_root" class="property item">
<h3 class="name"><code>root</code></h3>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l172"><code>app/js/model-extensions/model-sync-rest.js:172</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>A string which represents the root or collection part of the URL which
relates to a Model or ModelList. Usually this value should be same for all
instances of a specific Model/ModelList subclass.</p>
<p>When sub-classing <code>Y.Model</code>, usually you'll only need to override this
property, which lets the URLs for the XHRs be generated by convention. If
the <code>root</code> string ends with a trailing-slash, XHR URLs will also end with a
"/", and if the <code>root</code> does not end with a slash, neither will the XHR URLs.</p>
</div>
<p><strong>Default:</strong> ""</p>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<pre class="code prettyprint"><code>Y.User = Y.Base.create('user', Y.Model, [Y.ModelSync.REST], {
root: '/users'
});
var currentUser, newUser;
// GET the user data from: "/users/123"
currentUser = new Y.User({id: '123'}).load();
// POST the new user data to: "/users"
newUser = new Y.User({name: 'Eric Ferraiuolo'}).save();
</code></pre>
<p>When sub-classing <code>Y.ModelList</code>, usually you'll want to ignore configuring
the <code>root</code> and simply rely on the build-in convention of the list's
generated URLs defaulting to the <code>root</code> specified by the list's <code>model</code>.</p>
</div>
</div>
</div>
<div id="property_url" class="property item">
<h3 class="name"><code>url</code></h3>
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
<div class="meta">
<p>
Defined in
<a href="../files/app_js_model-extensions_model-sync-rest.js.html#l206"><code>app/js/model-extensions/model-sync-rest.js:206</code></a>
</p>
<p>Available since 3.6.0</p>
</div>
<div class="description">
<p>A string which specifies the URL to use when making XHRs, if not value is
provided, the URLs used to make XHRs will be generated by convention.</p>
<p>While a <code>url</code> can be provided for each Model/ModelList instance, usually
you'll want to either rely on the default convention or provide a tokenized
string on the prototype which can be used for all instances.</p>
<p>When sub-classing <code>Y.Model</code>, you will probably be able to rely on the
default convention of generating URLs in conjunction with the <code>root</code>
property and whether the model is new or not (i.e. has an <code>id</code>). If the
<code>root</code> property ends with a trailing-slash, the generated URL for the
specific model will also end with a trailing-slash.</p>
</div>
<p><strong>Default:</strong> ""</p>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<pre class="code prettyprint"><code>Y.User = Y.Base.create('user', Y.Model, [Y.ModelSync.REST], {
root: '/users/'
});
var currentUser, newUser;
// GET the user data from: "/users/123/"
currentUser = new Y.User({id: '123'}).load();
// POST the new user data to: "/users/"
newUser = new Y.User({name: 'Eric Ferraiuolo'}).save();
</code></pre>
<p>If a <code>url</code> is specified, it will be processed by <code>Y.Lang.sub()</code>, which is
useful when the URLs for a Model/ModelList subclass match a specific pattern
and can use simple replacement tokens; e.g.:</p><pre class="code prettyprint"><code>Y.User = Y.Base.create('user', Y.Model, [Y.ModelSync.REST], {
root: '/users',
url : '/users/{username}'
});
</code></pre>
<p><strong>Note:</strong> String subsitituion of the <code>url</code> only use string an number values
provided by this object's attribute and/or the <code>options</code> passed to the
<code>getURL()</code> method. Do not expect something fancy to happen with Object,
Array, or Boolean values, they will simply be ignored.</p>
<p>If your URLs have plural roots or collection URLs, while the specific item
resources are under a singular name, e.g. "/users" (plural) and "/user/123"
(singular), you'll probably want to configure the <code>root</code> and <code>url</code>
properties like this:</p><pre class="code prettyprint"><code>Y.User = Y.Base.create('user', Y.Model, [Y.ModelSync.REST], {
root: '/users',
url : '/user/{id}'
});
var currentUser, newUser;
// GET the user data from: "/user/123"
currentUser = new Y.User({id: '123'}).load();
// POST the new user data to: "/users"
newUser = new Y.User({name: 'Eric Ferraiuolo'}).save();
</code></pre>
<p>When sub-classing <code>Y.ModelList</code>, usually you'll be able to rely on the
associated <code>model</code> to supply its <code>root</code> to be used as the model list's URL.
If this needs to be customized, you can provide a simple string for the
<code>url</code> property.</p><pre class="code prettyprint"><code>Y.Users = Y.Base.create('users', Y.ModelList, [Y.ModelSync.REST], {
// Leverages <code>Y.User</code>'s <code>root</code>, which is "/users".
model: Y.User
});
// Or specified explicitly...
Y.Users = Y.Base.create('users', Y.ModelList, [Y.ModelSync.REST], {
model: Y.User,
url : '/users'
});
</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>