blob: 1013d701be0e69efa0970d2690b41d32d3636ba5 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: odata</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: odata</h1>
<section>
<header>
<h2>
odata
</h2>
</header>
<article>
<div class="container-overview">
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="odata.js.html">odata.js</a>, <a href="odata.js.html#line21">line 21</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="defaultSuccess"><span class="type-signature">&lt;static> </span>defaultSuccess<span class="signature">(data)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Default success handler for OData.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
</td>
<td class="description last">Data to process.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="odata.js.html">odata.js</a>, <a href="odata.js.html#line67">line 67</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="parseMetadata"><span class="type-signature">&lt;static> </span>parseMetadata<span class="signature">(csdlMetadataDocument)</span><span class="type-signature"> &rarr; {Object}</span></h4>
</dt>
<dd>
<div class="description">
Parses the csdl metadata to ODataJS metatdata format. This method can be used when the metadata is retrieved using something other than odatajs
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>csdlMetadataDocument</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">A string that represents the entire csdl metadata.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="odata.js.html">odata.js</a>, <a href="odata.js.html#line172">line 172</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
An object that has the representation of the metadata in odatajs format.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="read"><span class="type-signature">&lt;static> </span>read<span class="signature">(urlOrRequest, <span class="optional">success</span>, <span class="optional">error</span>, <span class="optional">handler</span>, <span class="optional">httpClient</span>, <span class="optional">metadata</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Reads data from the specified URL.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>urlOrRequest</code></td>
<td class="type">
</td>
<td class="attributes">
</td>
<td class="description last">URL to read data from.</td>
</tr>
<tr>
<td class="name"><code>success</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>handler</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>httpClient</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>metadata</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="odata.js.html">odata.js</a>, <a href="odata.js.html#line110">line 110</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="request"><span class="type-signature">&lt;static> </span>request<span class="signature">(request, <span class="optional">success</span>, <span class="optional">error</span>, <span class="optional">handler</span>, <span class="optional">httpClient</span>, <span class="optional">metadata</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Sends a request containing OData payload to a server.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>request</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
</td>
<td class="description last">Object that represents the request to be sent.</td>
</tr>
<tr>
<td class="name"><code>success</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>error</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>handler</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>httpClient</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
<tr>
<td class="name"><code>metadata</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">-</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="odata.js.html">odata.js</a>, <a href="odata.js.html#line130">line 130</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="dispatchHandler"><span class="type-signature">&lt;inner> </span>dispatchHandler<span class="signature">(handlerMethod, requestOrResponse, context)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Dispatches an operation to handlers.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>handlerMethod</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Name of handler method to invoke.</td>
</tr>
<tr>
<td class="name"><code>requestOrResponse</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">request/response argument for delegated call.</td>
</tr>
<tr>
<td class="name"><code>context</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">context argument for delegated call.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="odata.js.html">odata.js</a>, <a href="odata.js.html#line53">line 53</a>
</li></ul></dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-cache.html">cache</a></li><li><a href="source.html">cache/source</a></li><li><a href="module-odata.html">odata</a></li><li><a href="batch.html">odata/batch</a></li><li><a href="handler.html">odata/handler</a></li><li><a href="json.html">odata/json</a></li><li><a href="metadata.html">odata/metadata</a></li><li><a href="net.html">odata/net</a></li><li><a href="utils.html">odata/utils</a></li><li><a href="deferred.html">odatajs/deferred</a></li><li><a href="utils_.html">odatajs/utils</a></li><li><a href="xml.html">odatajs/xml</a></li><li><a href="module-store.html">store</a></li><li><a href="dom.html">store/dom</a></li><li><a href="indexeddb.html">store/indexeddb</a></li><li><a href="memory.html">store/memory</a></li></ul><h3>Classes</h3><ul><li><a href="DataCache.html">DataCache</a></li><li><a href="DataCacheOperation.html">DataCacheOperation</a></li><li><a href="DjsDeferred.html">DjsDeferred</a></li><li><a href="dom-DomStore.html">DomStore</a></li><li><a href="indexeddb-IndexedDBStore.html">IndexedDBStore</a></li><li><a href="memory-MemoryStore.html">MemoryStore</a></li><li><a href="ODataCacheSource.html">ODataCacheSource</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Thu Apr 09 2015 08:31:26 GMT+0200 (MESZ)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>