mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-01 15:30:43 +00:00
400 lines
9.0 KiB
HTML
400 lines
9.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset='UTF-8'>
|
|
<title>CoffeeScript API Documentation</title>
|
|
<script src='../../../../javascript/application.js'></script>
|
|
<script src='../../../../javascript/search.js'></script>
|
|
<link rel='stylesheet' href='../../../../stylesheets/application.css' type='text/css'>
|
|
</head>
|
|
<body>
|
|
<div id='base' data-path='../../../../'></div>
|
|
<div id='header'>
|
|
<div id='menu'>
|
|
<a href='../../../../alphabetical_index.html' title='Index'>
|
|
Index
|
|
</a>
|
|
»
|
|
<span class='title'>lib</span>
|
|
»
|
|
<span class='title'>resin</span>
|
|
»
|
|
<span class='title'>models</span>
|
|
»
|
|
<span class='title'>application.coffee</span>
|
|
</div>
|
|
</div>
|
|
<div id='content'>
|
|
<h1>
|
|
File:
|
|
application.coffee
|
|
</h1>
|
|
<table class='box'>
|
|
<tr>
|
|
<td>Defined in:</td>
|
|
<td>lib/resin/models</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Method Summary</h2>
|
|
<ul class='summary'>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getAll-'>
|
|
~
|
|
(void)
|
|
<b>getAll</b><span>(callback)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Get all applications <pre><code>resin.models.application.getAll (error, applications) -> throw error if error? console.log(applications)
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#get-'>
|
|
~
|
|
(void)
|
|
<b>get</b><span>(id, callback)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Get a single application <pre><code>resin.models.application.get 51, (error, application) -> throw error if error? console.log(application)
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#create-'>
|
|
~
|
|
(void)
|
|
<b>create</b><span>(name, deviceType, callback)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Create an application <pre><code>resin.models.application.create 'My App', 'raspberry-pi', (error, id) -> throw error if error? console.log(id)
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#remove-'>
|
|
~
|
|
(void)
|
|
<b>remove</b><span>(id, callback)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Remove application <pre><code>resin.models.application.remove 51, (error) -> throw error if error?
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#restart-'>
|
|
~
|
|
(void)
|
|
<b>restart</b><span>(id, callback)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Restart application <pre><code>resin.models.application.restart 51, (error) -> throw error if error?
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
<h2>Method Details</h2>
|
|
<div class='methods'>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getAll-'>
|
|
~
|
|
(void)
|
|
<b>getAll</b><span>(callback)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Get all applications</p><pre><code>resin.models.application.getAll (error, applications) -> throw error if error? console.log(applications)
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>callback</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>Function</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>callback(error, applications) </span>
|
|
</li>
|
|
</ul>
|
|
<h3>Throws:</h3>
|
|
<ul class='throw'>
|
|
<li>
|
|
<span class='type'></span>
|
|
(
|
|
<tt><a href='../../../../class/NotAny.html'>NotAny</a></tt>
|
|
)
|
|
—
|
|
<span class='desc'>Will throw if no applications were found </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='get-'>
|
|
~
|
|
(void)
|
|
<b>get</b><span>(id, callback)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Get a single application</p><pre><code>resin.models.application.get 51, (error, application) -> throw error if error? console.log(application)
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>id</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>String, Number</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>application id </span>
|
|
</li>
|
|
<li>
|
|
<span class='name'>callback</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>Function</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>callback(error, application) </span>
|
|
</li>
|
|
</ul>
|
|
<h3>Throws:</h3>
|
|
<ul class='throw'>
|
|
<li>
|
|
<span class='type'></span>
|
|
(
|
|
<tt><a href='../../../../class/NotFound.html'>NotFound</a></tt>
|
|
)
|
|
—
|
|
<span class='desc'>Will throw if application was not found </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='create-'>
|
|
~
|
|
(void)
|
|
<b>create</b><span>(name, deviceType, callback)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Create an application</p><pre><code>resin.models.application.create 'My App', 'raspberry-pi', (error, id) -> throw error if error? console.log(id)
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>name</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>String</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>application name </span>
|
|
</li>
|
|
<li>
|
|
<span class='name'>deviceType</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>String</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>device type (slug form) </span>
|
|
</li>
|
|
<li>
|
|
<span class='name'>callback</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>Function</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>callback(error, id) </span>
|
|
</li>
|
|
</ul>
|
|
<h3>Throws:</h3>
|
|
<ul class='throw'>
|
|
<li>
|
|
<span class='type'></span>
|
|
(
|
|
<tt><a href='../../../../class/NotFound.html'>NotFound</a></tt>
|
|
)
|
|
—
|
|
<span class='desc'>Will throw if the request doesn't returns an id </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='remove-'>
|
|
~
|
|
(void)
|
|
<b>remove</b><span>(id, callback)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Remove application</p><pre><code>resin.models.application.remove 51, (error) -> throw error if error?
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>id</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>String, Number</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>application id </span>
|
|
</li>
|
|
<li>
|
|
<span class='name'>callback</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>Function</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>callback(error) </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='restart-'>
|
|
~
|
|
(void)
|
|
<b>restart</b><span>(id, callback)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Restart application</p><pre><code>resin.models.application.restart 51, (error) -> throw error if error?
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>id</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>String, Number</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>application id </span>
|
|
</li>
|
|
<li>
|
|
<span class='name'>callback</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>Function</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>callback(error) </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id='footer'>
|
|
December 09, 14 12:47:37 by
|
|
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
|
Codo
|
|
</a>
|
|
2.0.9
|
|
✲
|
|
Press H to see the keyboard shortcuts
|
|
✲
|
|
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
|
✲
|
|
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
|
</div>
|
|
<iframe id='search_frame'></iframe>
|
|
<div id='fuzzySearch'>
|
|
<input type='text'>
|
|
<ol></ol>
|
|
</div>
|
|
<div id='help'>
|
|
<p>
|
|
Quickly fuzzy find classes, mixins, methods, file:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<span>T</span>
|
|
Open fuzzy finder dialog
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
Control the navigation frame:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<span>L</span>
|
|
Toggle list view
|
|
</li>
|
|
<li>
|
|
<span>C</span>
|
|
Show class list
|
|
</li>
|
|
<li>
|
|
<span>I</span>
|
|
Show mixin list
|
|
</li>
|
|
<li>
|
|
<span>F</span>
|
|
Show file list
|
|
</li>
|
|
<li>
|
|
<span>M</span>
|
|
Show method list
|
|
</li>
|
|
<li>
|
|
<span>E</span>
|
|
Show extras list
|
|
</li>
|
|
</ul>
|
|
<p>
|
|
You can focus and blur the search input:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<span>S</span>
|
|
Focus search input
|
|
</li>
|
|
<li>
|
|
<span>Esc</span>
|
|
Blur search input
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html> |