This repository has been archived by the owner on Dec 5, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better encapsulation of pipes and a first pass at auto-generated docs
- Loading branch information
Showing
61 changed files
with
10,859 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
require 'rake' | ||
require 'pdoc' | ||
|
||
desc "Builds the documentation" | ||
task :build_doc do | ||
hash = `git show-ref --hash HEAD`.chomp[0..6] | ||
|
||
PDoc.run({ | ||
:source_files => Dir[File.join("src", "**", "*.js")], | ||
:destination => "docs", | ||
:syntax_highlighter => :none, | ||
:markdown_parser => :bluecloth, | ||
:src_code_href => proc { |obj| | ||
"https://github.com/aerogear/aerogear-js/blob/#{hash}/#{obj.file}#L#{obj.line_number}" | ||
}, | ||
:pretty_urls => false, | ||
:bust_cache => true, | ||
:name => 'AeroGear JavaScript Library', | ||
:short_name => 'AeroGear.js', | ||
:home_url => 'http://aerogear.org', | ||
:doc_url => 'http://aerogear.org/docs', | ||
:version => "1.0.0.Alpha", | ||
:copyright_notice => 'Add license info here' | ||
}) | ||
end | ||
|
||
desc "Empties output directory" | ||
task :remove_doc do | ||
rm_rf Dir.glob(File.join(docs, "*")) | ||
end | ||
|
||
desc "Empties the output directory and builds the documentation." | ||
task :doc => [:remove_doc, :build_doc] |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>AeroGear.js v1.0.0.Alpha API documentation | aerogear.pipeline.adapters</title> | ||
<meta name="generator" content="PDoc" /> | ||
|
||
<script charset="utf-8" src="../../../javascripts/pdoc/prototype.js" type="text/javascript"></script> | ||
<script charset="utf-8" src="../../../javascripts/pdoc/application.js" type="text/javascript"></script> | ||
<script charset="utf-8" src="../../../javascripts/pdoc/tabs.js" type="text/javascript"></script> | ||
<script charset="utf-8" src="../../../javascripts/pdoc/item_index.js" type="text/javascript"></script> | ||
|
||
<link charset="utf-8" href="../../../stylesheets/pdoc/api.css" media="screen, projection" rel="stylesheet" type="text/css" /> | ||
<link charset="utf-8" href="../../../stylesheets/pdoc/pygments.css" media="screen, projection" rel="stylesheet" type="text/css" /> | ||
|
||
<script type="text/javascript"> | ||
PDoc.pathPrefix = '../../../'; | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div id="sidebar"> | ||
<ul id="sidebar_tabs" class="sidebar-tabs"> | ||
<li> | ||
<a href="#menu_pane">Menu</a> | ||
</li> | ||
<li> | ||
<a href="#search_pane">Search</a> | ||
</li> | ||
</ul> <!-- .sidebar-tabs --> | ||
|
||
<form class="search-ribbon"> | ||
<label> | ||
<span class="hidden">Search</span> | ||
<input type="text" id="search" size="20" title="Search" /> | ||
</label> | ||
</form> | ||
|
||
<div class="sidebar-pane scrollable" id="menu_pane"> | ||
<ul class="menu-items" id="api_menu"><li><div class="menu-item"><a class="namespace current-parent" href="../../../aerogear/index.html" title="aerogear (namespace)">aerogear</a></div><ul><li><div class="menu-item"><a class="namespace current-parent" href="../../../aerogear/pipeline/index.html" title="aerogear.pipeline (namespace)">aerogear.pipeline</a></div><ul><li><div class="menu-item"><a class="namespace current" href="../../../aerogear/pipeline/adapters/index.html" title="aerogear.pipeline.adapters (namespace)">aerogear.pipeline.adapters</a></div><ul><li><div class="menu-item"><a class="namespace" href="../../../aerogear/pipeline/adapters/rest/index.html" title="aerogear.pipeline.adapters.rest (namespace)">aerogear.pipeline.adapters.rest</a></div></li></ul><ul></ul></li></ul><ul><li><div class="menu-item"><a class="instance-method" href="../../../aerogear/pipeline/prototype/add/index.html" title="aerogear.pipeline#add (instance method)">add</a></div></li> | ||
<li><div class="menu-item"><a class="instance-method" href="../../../aerogear/pipeline/prototype/remove/index.html" title="aerogear.pipeline#remove (instance method)">remove</a></div></li></ul></li></ul></li></ul><!--- #api_menu =--> | ||
</div> <!-- .sidebar-pane --> | ||
<div class="sidebar-pane" id="search_pane"> | ||
<ul id="search_results" class="search-results menu-items scrollable"></ul> | ||
</div> <!-- .sidebar-pane --> | ||
</div> <!-- #sidebar --> | ||
|
||
<div id="page"> | ||
|
||
|
||
<div id="main" class="page-content"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<ul class="breadcrumbs clearfix"> | ||
<li><a href="../../../">Home</a></li> | ||
|
||
<li>→ <a href="../../../aerogear/index.html" title="aerogear (namespace)">aerogear</a></li> | ||
|
||
<li>→ <a href="../../../aerogear/pipeline/index.html" title="aerogear.pipeline (namespace)">pipeline</a></li> | ||
|
||
<li>→ <a href="../../../aerogear/pipeline/adapters/index.html" title="aerogear.pipeline.adapters (namespace)">adapters</a></li> | ||
|
||
</ul> | ||
|
||
|
||
<p id="src_code_href"><a href="https://github.com/aerogear/aerogear-js/blob/ce76c42/src/pipeline/aerogear.pipeline.js#L162">src code</a></p> | ||
|
||
|
||
<h2 class="page-title"> | ||
<span class="type">namespace</span> aerogear.pipeline.adapters | ||
</h2> | ||
|
||
|
||
|
||
|
||
<div class="section section-description"> | ||
<div class="section-title"> | ||
<h3>Description</h3> | ||
</div> <!-- .section-title --> | ||
<div class="section-content"> | ||
|
||
<p>The adapters object is provided so that adapters can be added to the aerogear.pipeline namespace dynamically and still be accessible to the add method</p> | ||
</div> <!-- .section-content --> | ||
</div> <!-- .section --> | ||
|
||
|
||
|
||
|
||
<div class="section section-namespaces"> | ||
<div class="section-title"> | ||
<h3>Namespaces</h3> | ||
</div> <!-- .section-title --> | ||
<div class="section-content"> | ||
|
||
<ul class="method-details-list"> | ||
<li class="method-description"> | ||
<h4><a href="../../../aerogear/pipeline/adapters/rest/index.html">aerogear.pipeline.adapters.rest</a></h4> | ||
|
||
|
||
<p><p>The REST adapter is the default type used when creating a new pipe. It uses jQuery.ajax to communicate with the server. By default, the RESTful endpoint used by this pipe is the app's current context, followed by the pipe name. For example, if the app is running on http://mysite.com/myApp, then a pipe named <code>tasks</code> would use http://mysite.com/myApp/tasks as its REST endpoint.</p></p> | ||
|
||
</li> | ||
</ul> | ||
</div> <!-- .section-content --> | ||
</div> <!-- .section --> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div> <!-- #main --> | ||
|
||
<div id="footer"> | ||
<p><a href="http://aerogear.org">AeroGear JavaScript Library</a> v1.0.0.Alpha API documentation.</p> | ||
<p> | ||
|
||
Last updated on August 22, 2012 at 13:06 UTC. | ||
|
||
Generated by <a href="http://pdoc.org">PDoc</a>. | ||
Uses <a href="http://famfamfam.com/lab/icons/silk/" title="famfamfam.com: Silk Icons">Silk Icons</a> and portions of <a href="http://github.com/280north/aristo/tree/master" title="280north's aristo at master - GitHub">Aristo</a>. | ||
</p> | ||
|
||
</div> <!-- #footer --> | ||
|
||
</div> <!-- #page --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>AeroGear.js v1.0.0.Alpha API documentation | aerogear.pipeline.adapters.read</title> | ||
<meta name="generator" content="PDoc" /> | ||
|
||
<script charset="utf-8" src="../../../../javascripts/pdoc/prototype.js" type="text/javascript"></script> | ||
<script charset="utf-8" src="../../../../javascripts/pdoc/application.js" type="text/javascript"></script> | ||
<script charset="utf-8" src="../../../../javascripts/pdoc/tabs.js" type="text/javascript"></script> | ||
<script charset="utf-8" src="../../../../javascripts/pdoc/item_index.js" type="text/javascript"></script> | ||
|
||
<link charset="utf-8" href="../../../../stylesheets/pdoc/api.css" media="screen, projection" rel="stylesheet" type="text/css" /> | ||
<link charset="utf-8" href="../../../../stylesheets/pdoc/pygments.css" media="screen, projection" rel="stylesheet" type="text/css" /> | ||
|
||
<script type="text/javascript"> | ||
PDoc.pathPrefix = '../../../../'; | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<div id="sidebar"> | ||
<ul id="sidebar_tabs" class="sidebar-tabs"> | ||
<li> | ||
<a href="#menu_pane">Menu</a> | ||
</li> | ||
<li> | ||
<a href="#search_pane">Search</a> | ||
</li> | ||
</ul> <!-- .sidebar-tabs --> | ||
|
||
<form class="search-ribbon"> | ||
<label> | ||
<span class="hidden">Search</span> | ||
<input type="text" id="search" size="20" title="Search" /> | ||
</label> | ||
</form> | ||
|
||
<div class="sidebar-pane scrollable" id="menu_pane"> | ||
<ul class="menu-items" id="api_menu"><li><div class="menu-item"><a class="namespace current-parent" href="../../../../aerogear/index.html" title="aerogear (namespace)">aerogear</a></div><ul><li><div class="menu-item"><a class="namespace current-parent" href="../../../../aerogear/pipeline/index.html" title="aerogear.pipeline (namespace)">aerogear.pipeline</a></div><ul><li><div class="menu-item"><a class="namespace current-parent" href="../../../../aerogear/pipeline/adapters/index.html" title="aerogear.pipeline.adapters (namespace)">aerogear.pipeline.adapters</a></div><ul><li><div class="menu-item"><a class="namespace" href="../../../../aerogear/pipeline/adapters/rest/index.html" title="aerogear.pipeline.adapters.rest (namespace)">aerogear.pipeline.adapters.rest</a></div></li></ul><ul><li><div class="menu-item"><a class="class-method current" href="../../../../aerogear/pipeline/adapters/read/index.html" title="aerogear.pipeline.adapters.read (class method)">read</a></div></li> | ||
<li><div class="menu-item"><a class="class-method" href="../../../../aerogear/pipeline/adapters/remove/index.html" title="aerogear.pipeline.adapters.remove (class method)">remove</a></div></li> | ||
<li><div class="menu-item"><a class="class-method" href="../../../../aerogear/pipeline/adapters/save/index.html" title="aerogear.pipeline.adapters.save (class method)">save</a></div></li></ul></li></ul></li></ul></li></ul><!--- #api_menu =--> | ||
</div> <!-- .sidebar-pane --> | ||
<div class="sidebar-pane" id="search_pane"> | ||
<ul id="search_results" class="search-results menu-items scrollable"></ul> | ||
</div> <!-- .sidebar-pane --> | ||
</div> <!-- #sidebar --> | ||
|
||
<div id="page"> | ||
|
||
|
||
<div id="main" class="page-content"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<ul class="breadcrumbs clearfix"> | ||
<li><a href="../../../../">Home</a></li> | ||
|
||
<li>→ <a href="../../../../aerogear/index.html" title="aerogear (namespace)">aerogear</a></li> | ||
|
||
<li>→ <a href="../../../../aerogear/pipeline/index.html" title="aerogear.pipeline (namespace)">pipeline</a></li> | ||
|
||
<li>→ <a href="../../../../aerogear/pipeline/adapters/index.html" title="aerogear.pipeline.adapters (namespace)">adapters</a></li> | ||
|
||
<li>→ <a href="../../../../aerogear/pipeline/adapters/read/index.html" title="aerogear.pipeline.adapters.read (class method)">read</a></li> | ||
|
||
</ul> | ||
|
||
|
||
<p id="src_code_href"><a href="https://github.com/aerogear/aerogear-js/blob/ce76c42/src/pipeline/adapters/rest.js#L82">src code</a></p> | ||
|
||
|
||
<h2 class="page-title"> | ||
<span class="type">class method</span> aerogear.pipeline.adapters.read | ||
</h2> | ||
|
||
|
||
|
||
|
||
<div class="section"> | ||
<div class="section-title"> | ||
</div> <!-- .section-title --> | ||
<div class="section-content"> | ||
<div class="method-description"> | ||
|
||
<pre class="syntax"><code class="ebnf">aerogear.pipeline.adapters.read( [options] ) → Object</code></pre> | ||
|
||
|
||
|
||
<p>Retrieve data asynchronously from the server.</p> | ||
|
||
<ul> | ||
<li><strong>options</strong> - Object (Optional) | ||
<ul> | ||
<li><strong>data</strong> - Object, a hash of key/value pairs that can be passed to the server as additional information for use when determining what data to return (Optional)</li> | ||
<li><strong>ajax</strong> - Object, a hash of key/value pairs that will be added to or override any AJAX settings set during creation of the pipe using this adapter (Optional)</li> | ||
</ul></li> | ||
</ul> | ||
|
||
<p>Returns a jqXHR which implements the Promise interface. See the <a href="http://api.jquery.com/category/deferred-object/">Defered Object</a> reference on the jQuery site for more information.</p> | ||
|
||
<pre><code class="javascript">var myPipe = aerogear.pipeline( "tasks" ).pipes[ 0 ]; | ||
// Get a set of key/value pairs of all data on the server associated with this pipe | ||
var allData = myPipe.read(); | ||
// A data object can be passed to filter the data and in the case of REST, | ||
// this object is converted to query string parameters which the server can use. | ||
// The values would be determined by what the server is expecting | ||
var filteredData = myPipe.read({ | ||
data: { | ||
limit: 10, | ||
date: "2012-08-01" | ||
... | ||
} | ||
});</code></pre> | ||
|
||
<p>Example returned data in allData:</p> | ||
|
||
<pre><code class="javascript">[ | ||
{ | ||
id: 12345 | ||
title: "Do Something", | ||
date: "2012-08-01", | ||
... | ||
}, | ||
{ | ||
id: 67890 | ||
title: "Do Something Else", | ||
date: "2012-08-02", | ||
... | ||
}, | ||
... | ||
]</code></pre> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div> | ||
</div> <!-- .section-content --> | ||
</div> <!-- .section --> | ||
|
||
</div> <!-- #main --> | ||
|
||
<div id="footer"> | ||
<p><a href="http://aerogear.org">AeroGear JavaScript Library</a> v1.0.0.Alpha API documentation.</p> | ||
<p> | ||
|
||
Last updated on August 22, 2012 at 12:45 UTC. | ||
|
||
Generated by <a href="http://pdoc.org">PDoc</a>. | ||
Uses <a href="http://famfamfam.com/lab/icons/silk/" title="famfamfam.com: Silk Icons">Silk Icons</a> and portions of <a href="http://github.com/280north/aristo/tree/master" title="280north's aristo at master - GitHub">Aristo</a>. | ||
</p> | ||
|
||
</div> <!-- #footer --> | ||
|
||
</div> <!-- #page --> | ||
</body> | ||
</html> |
Oops, something went wrong.