mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-14 14:42:33 +00:00
260 lines
5.8 KiB
HTML
260 lines
5.8 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'>device</span>
|
|
»
|
|
<span class='title'>device.coffee</span>
|
|
</div>
|
|
</div>
|
|
<div id='content'>
|
|
<h1>
|
|
File:
|
|
device.coffee
|
|
</h1>
|
|
<table class='box'>
|
|
<tr>
|
|
<td>Defined in:</td>
|
|
<td>lib/resin/device</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Method Summary</h2>
|
|
<ul class='summary'>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getDisplayName-'>
|
|
~
|
|
(String)
|
|
<b>getDisplayName</b><span>(device)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Get display name for a device <p>For a list of supported devices, see getSupportedDevices()</p><pre><code>console.log resin.device.getDisplayName('raspberry-pi')
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getDeviceSlug-'>
|
|
~
|
|
(String)
|
|
<b>getDeviceSlug</b><span>(device)</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Get device slug <pre><code>console.log resin.device.getDeviceSlug('Raspberry Pi')
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
<li>
|
|
<span class='signature'>
|
|
<a href='#getSupportedDevices-'>
|
|
~
|
|
(Array<String>)
|
|
<b>getSupportedDevices</b><span>()</span>
|
|
</a>
|
|
</span>
|
|
<span class='desc'>
|
|
Get a list of supported devices <pre><code>devices = resin.device.getSupportedDevices()
|
|
console.log(devices)
|
|
</code></pre>
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
<h2>Method Details</h2>
|
|
<div class='methods'>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getDisplayName-'>
|
|
~
|
|
(String)
|
|
<b>getDisplayName</b><span>(device)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Get display name for a device</p><p>For a list of supported devices, see getSupportedDevices()</p><pre><code>console.log resin.device.getDisplayName('raspberry-pi') # Raspberry Pi
|
|
console.log resin.device.getDisplayName('rpi') # Raspberry Pi
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>device</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>String</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>device name </span>
|
|
</li>
|
|
</ul>
|
|
<h3>Returns:</h3>
|
|
<ul class='return'>
|
|
<li>
|
|
<span class='type'></span>
|
|
(
|
|
<tt>String</tt>
|
|
)
|
|
—
|
|
<span class='desc'>device display name or 'Unknown' </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getDeviceSlug-'>
|
|
~
|
|
(String)
|
|
<b>getDeviceSlug</b><span>(device)</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Get device slug</p><pre><code>console.log resin.device.getDeviceSlug('Raspberry Pi') # raspberry-pi
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Parameters:</h3>
|
|
<ul class='param'>
|
|
<li>
|
|
<span class='name'>device</span>
|
|
<span class='type'>
|
|
(
|
|
<tt>String</tt>
|
|
)
|
|
</span>
|
|
—
|
|
<span class='desc'>device name </span>
|
|
</li>
|
|
</ul>
|
|
<h3>Returns:</h3>
|
|
<ul class='return'>
|
|
<li>
|
|
<span class='type'></span>
|
|
(
|
|
<tt>String</tt>
|
|
)
|
|
—
|
|
<span class='desc'>device slug or 'unknown' </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class='method_details'>
|
|
<p class='signature' id='getSupportedDevices-'>
|
|
~
|
|
(Array<String>)
|
|
<b>getSupportedDevices</b><span>()</span>
|
|
<br>
|
|
</p>
|
|
<div class='docstring'>
|
|
<p>Get a list of supported devices</p><pre><code>devices = resin.device.getSupportedDevices()
|
|
console.log(devices)
|
|
</code></pre>
|
|
</div>
|
|
<div class='tags'>
|
|
<h3>Returns:</h3>
|
|
<ul class='return'>
|
|
<li>
|
|
<span class='type'></span>
|
|
(
|
|
<tt>Array<String></tt>
|
|
)
|
|
—
|
|
<span class='desc'>a list of all supported devices, by their display names </span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id='footer'>
|
|
December 09, 14 09:05:26 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> |