Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/haydn/json-api-store. An isomorphic JavaScript library that acts as an in memory data store for JSON API data. particlesystem.com/json-api-store
json-api
Something went wrong. Try again.
5.9 kB · 194 lines
HTML
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195<!DOCTYPE html><html><head> <meta charset="utf-8"> <base data-ice="baseUrl" href="../"> <title data-ice="title">Function | API Document</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> </head><body class="layout-container">
<header> <a href="./">Home</a> <a href="identifiers.html">Identifier</a> <a href="source.html">Source</a> <a data-ice="repoURL" href="https://github.com/haydn/json-api-store" class="repo-url-github">Repository</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div></header>
<nav class="navigation" data-ice="nav"><div data-ice="classWrap"> <h2>Class</h2> <ul> <li data-ice="classDoc"><span><a href="class/src/ajax-adapter.js~AjaxAdapter.html">AjaxAdapter</a></span></li><li data-ice="classDoc"><span><a href="class/src/store.js~Store.html">Store</a></span></li></ul></div>
<div data-ice="functionWrap"> <h2><a href="function/">Function</a></h2> <ul> <li data-ice="functionDoc"><span><a href="function/index.html#static-function-ajax">ajax</a></span></li></ul></div>
</nav>
<div class="content" data-ice="content"><h1 data-ice="title">Function</h1><div data-ice="summaries"><table class="summary" data-ice="summary"> <thead><tr><td data-ice="title" colspan="3">Static Public Summary</td></tr></thead> <tbody> <tr data-ice="target"> <td> <span class="access" data-ice="access">public</span> <span class="override" data-ice="override"></span> </td> <td> <div> <p> <span data-ice="name"><span><a href="function/index.html#static-function-ajax">ajax</a></span></span><span data-ice="signature">(settings: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>Observable</span></span> </p> </div> <div> <div data-ice="description"><p>Creates an observable for an Ajax request with either a settings object with url, headers, etc or a string for a URL.</p></div> </div> </td> <td> </td> </tr></tbody></table></div><div data-ice="details"><h2 data-ice="title">Static Public </h2>
<div class="detail" data-ice="detail"> <h3 data-ice="anchor" id="static-function-ajax"> <span class="access" data-ice="access">public</span> <span data-ice="name">ajax</span><span data-ice="signature">(settings: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>Observable</span></span> <span class="right-info"> <span data-ice="source"><span><a href="file/src/ajax.js.html#lineNumber110">source</a></span></span> </span> </h3>
<div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode">import ajax from '<span><a href="file/src/ajax.js.html#lineNumber110">json-api-store/src/ajax.js</a></span>'</code></pre></div> <div data-ice="description"><p>Creates an observable for an Ajax request with either a settings object with url, headers, etc or a string for a URL.</p></div>
<div data-ice="properties"><div data-ice="properties"> <h4 data-ice="title">Params:</h4> <table class="params"> <thead> <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr> </thead> <tbody> <tr data-ice="property" data-depth="0"> <td data-ice="name" data-depth="0">settings</td> <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td> <td data-ice="appendix"></td> <td data-ice="description"><p>Can be one of the following:</p><p> A string of the URL to make the Ajax call. An object with the following properties</p><ul><li>url: URL of the request</li><li>body: The body of the request</li><li>method: Method of the request, such as GET, POST, PUT, PATCH, DELETE</li><li>async: Whether the request is async</li><li>headers: Optional headers</li><li>crossDomain: true if a cross domain request, else false</li><li>responseType: "text" (default), "json" or "auto"</li></ul></td> </tr></tbody> </table></div></div>
<div class="return-params" data-ice="returnParams"> <h4>Return:</h4> <table> <tr> <td class="return-type" data-ice="returnType"><span>Observable</span></td> <td class="return-desc" data-ice="returnDescription"><p>An observable sequence containing the XMLHttpRequest.</p></td> </tr> </table> <div data-ice="returnProperties"></div> </div>
<div data-ice="example"> <h4>Example:</h4> <div class="example-doc" data-ice="exampleDoc"> <pre class="prettyprint source-code"><code data-ice="exampleCode"> source = ajax('/products'); source = ajax({ url: 'products', method: 'GET' });</code></pre> </div></div>
</div></div></div>
<footer class="footer"> Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.2.6)</span></a></footer>
<script src="script/search_index.js"></script><script src="script/search.js"></script><script src="script/pretty-print.js"></script><script src="script/inherited-summary.js"></script><script src="script/test-summary.js"></script><script src="script/inner-link.js"></script><script src="script/patch-for-local.js"></script></body></html>