Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 082469c

Browse files
committed
doc update
1 parent 83a2079 commit 082469c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+223
-95
lines changed

docs/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="jobs.h
4646

4747

4848
<section class="readme">
49-
<article><h1 id="paperspace-api-v0-1-9-">Paperspace API (v0.1.9)</h1>
49+
<article><h1 id="paperspace-api-v0-1-10-">Paperspace API (v0.1.10)</h1>
5050
<p><img src="https://user-images.githubusercontent.com/585865/27562775-26b8acc6-5a9c-11e7-8270-2b80ca895bc5.png" alt="image"></p>
5151
<hr>
5252
<p><strong>Heads up! This project is under construction!</strong> We welcome your bug reports and suggestions via GitHub Issues!</p>
@@ -64,9 +64,9 @@ <h3 id="installation">Installation</h3>
6464
<h4 id="option-1-download-the-pre-built-paperspace-binary-for-your-plaftorm">Option 1: Download the pre-built 'paperspace' binary for your plaftorm</h4>
6565
<p>Pre-built 'paperspace' binaries are available for:</p>
6666
<ul>
67-
<li><a href="https://s3.amazonaws.com/paperspace-node/v0.1.9/win/paperspace.exe">Windows</a></li>
68-
<li><a href="https://s3.amazonaws.com/paperspace-node/v0.1.9/mac/paperspace">Mac</a></li>
69-
<li><a href="https://s3.amazonaws.com/paperspace-node/v0.1.9/linux/paperspace">Linux</a></li>
67+
<li><a href="https://s3.amazonaws.com/paperspace-node/v0.1.10/win/paperspace.exe">Windows</a></li>
68+
<li><a href="https://s3.amazonaws.com/paperspace-node/v0.1.10/mac/paperspace">Mac</a></li>
69+
<li><a href="https://s3.amazonaws.com/paperspace-node/v0.1.10/linux/paperspace">Linux</a></li>
7070
</ul>
7171
<p>After downloading, make sure the 'paperspace' binary is permitted to run on your system by marking its permissions appropriately.
7272
Also, add the directory containing the 'paperspace' binary to your path using a method appropriate for your platform.</p>
@@ -81,7 +81,7 @@ <h3 id="obtaining-an-api-key">Obtaining an API key</h3>
8181
<p>Your API key allows you to access the Paperspace APIs and Gradient features from the command line, or from within apps that you develop. Each API key has an API Token name associated with it.</p>
8282
<p>There are two ways to create an API key, either via the Paperspace CLI, or from within the <a href="https://www.paperspace.com/console/account/api">API</a> section of your Paperspace console.</p>
8383
<h4 id="option-1-obtain-an-api-key-via-paperspace-cli">Option 1: Obtain an API key via Paperspace CLI</h4>
84-
<p>You can create your first API key by logging into your account via the Paperspace CLI: </p>
84+
<p>You can create your first API key by logging into your account via the Paperspace CLI:</p>
8585
<pre class="prettyprint source"><code>$ paperspace login</code></pre><p> -or-</p>
8686
<pre class="prettyprint source"><code>$ paperspace login [&lt;user@domain.com>] [&lt;password>] [--apiToken &lt;api token name>]</code></pre><p>If you don't already have an API key in your paperspace account, this command will generate one and give it a default API token name of 'API token'.</p>
8787
<p>If you already have one or more API keys in your account, the API key associated with the first API token listed in your account is downloaded. If you want to use a particular API key you can specify the associated API token name using the '--apiToken' option.</p>
@@ -163,7 +163,7 @@ <h2 id="copyright">Copyright</h2>
163163
<br class="clear">
164164

165165
<footer>
166-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
166+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
167167
</footer>
168168

169169
<script>prettyPrint();</script>

docs/jobs.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ <h4 class="name" id=".create"><span class="type-signature">(static) </span>creat
13191319

13201320
<dt class="tag-source">Source:</dt>
13211321
<dd class="tag-source"><ul class="dummy"><li>
1322-
<a href="jobs_create.js.html">jobs/create.js</a>, <a href="jobs_create.js.html#line17">line 17</a>
1322+
<a href="jobs_create.js.html">jobs/create.js</a>, <a href="jobs_create.js.html#line18">line 18</a>
13231323
</li></ul></dd>
13241324

13251325

@@ -2682,7 +2682,7 @@ <h6>Properties</h6>
26822682

26832683
<tr>
26842684

2685-
<td class="name"><code>comand</code></td>
2685+
<td class="name"><code>command</code></td>
26862686

26872687

26882688
<td class="type">
@@ -4469,7 +4469,7 @@ <h5>Returns:</h5>
44694469
<br class="clear">
44704470

44714471
<footer>
4472-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
4472+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
44734473
</footer>
44744474

44754475
<script>prettyPrint();</script>

docs/jobs_artifactsDestroy.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h1 class="page-title">jobs/artifactsDestroy.js</h1>
102102
<br class="clear">
103103

104104
<footer>
105-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
105+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106106
</footer>
107107

108108
<script>prettyPrint();</script>

docs/jobs_artifactsGet.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h1 class="page-title">jobs/artifactsGet.js</h1>
280280
<br class="clear">
281281

282282
<footer>
283-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
283+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
284284
</footer>
285285

286286
<script>prettyPrint();</script>

docs/jobs_artifactsList.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ <h1 class="page-title">jobs/artifactsList.js</h1>
133133
<br class="clear">
134134

135135
<footer>
136-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
136+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
137137
</footer>
138138

139139
<script>prettyPrint();</script>

docs/jobs_clone.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h1 class="page-title">jobs/clone.js</h1>
130130
<br class="clear">
131131

132132
<footer>
133-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
133+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
134134
</footer>
135135

136136
<script>prettyPrint();</script>

docs/jobs_create.js.html

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ <h1 class="page-title">jobs/create.js</h1>
5252
var jobs_logs = require('./../jobs/logs.js');
5353
var jobs_waitfor = require('./../jobs/waitfor.js');
5454
var jobs_show = require('./../jobs/show.js');
55+
const chalk = require('chalk');
5556

5657
/**
5758
* @memberof jobs
@@ -175,6 +176,32 @@ <h1 class="page-title">jobs/create.js</h1>
175176
});
176177
}
177178

179+
function LinksFromIpPortMappings(ipAddress, ports) {
180+
var result = [];
181+
var portMappings = ('' + ports).split(",");
182+
for (var i = 0; i &lt; portMappings.length; i++) {
183+
var portMapping = portMappings[i];
184+
var portMappingParts = portMapping.split(":");
185+
if (portMappingParts.length > 0) {
186+
var portMappedTo = portMappingParts[0].trim();
187+
if (portMappedTo) {
188+
var scheme = 'http';
189+
if (portMappingParts.length > 2) {
190+
var portMappingSchme = portMappingParts[2].trim();
191+
if (portMappingSchme) scheme = portMappingSchme;
192+
} else if (portMappingParts.length > 1) {
193+
var portMappedFrom = portMappingParts[1].trim();
194+
if (portMappedFrom == '22') scheme = 'ssh';
195+
if (portMappedFrom == '443') scheme = 'https';
196+
}
197+
var link = scheme + '://' + ipAddress + ':' + portMappedTo + '/';
198+
result.push(link);
199+
}
200+
}
201+
}
202+
return result;
203+
}
204+
178205
var MAX_UPLOAD_SIZE = 104857600; // 100MB
179206

180207
function create(params, cb) {
@@ -283,7 +310,19 @@ <h1 class="page-title">jobs/create.js</h1>
283310
return cb();
284311
}
285312
if (res.storageRegion) console.log('Storage Region: ' + res.storageRegion);
286-
if (res.ports &amp;&amp; res.ipAddress) console.log('IP Address: ' + res.ipAddress);
313+
if (res.ports &amp;&amp; res.ipAddress) {
314+
var links = LinksFromIpPortMappings(res.ipAddress, res.ports);
315+
if (links.length > 0) {
316+
var link_str = '';
317+
for (var i = 0; i &lt; links.length; i++) {
318+
var link = links[i];
319+
if (i > 0) link_str += ', ';
320+
link_str += chalk.underline(link);
321+
}
322+
if (links.length > 1) console.log('Links: ' + link_str);
323+
else console.log('Link: ' + link_str);
324+
} else console.log('IP Address: ' + res.ipAddress);
325+
}
287326
console.log('Awaiting logs...');
288327
return jobs_logs({ jobId: jobId, tail: true }, function _logsCb(err) {
289328
if (err) return cb(err);
@@ -475,7 +514,7 @@ <h1 class="page-title">jobs/create.js</h1>
475514
<br class="clear">
476515

477516
<footer>
478-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
517+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
479518
</footer>
480519

481520
<script>prettyPrint();</script>

docs/jobs_destroy.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h1 class="page-title">jobs/destroy.js</h1>
103103
<br class="clear">
104104

105105
<footer>
106-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
107107
</footer>
108108

109109
<script>prettyPrint();</script>

docs/jobs_index.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h1 class="page-title">jobs/index.js</h1>
6969
<br class="clear">
7070

7171
<footer>
72-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
72+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
7373
</footer>
7474

7575
<script>prettyPrint();</script>

docs/jobs_list.js.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ <h1 class="page-title">jobs/list.js</h1>
5757
* @param {string} [filter.machineType] - Optional machineType to match on
5858
* @param {string} [filter.state] - Optional state value to match on
5959
* @param {string} [filter.container] - Optional container to match on
60-
* @param {string} [filter.comand] - Optional command to match on
60+
* @param {string} [filter.command] - Optional command to match on
6161
* @param {string} [filter.workspace] - Optional workspace path to match on. Note: the original workspace path will be modified on upload to point to a temporary location.
6262
* @param {string} [filter.dataset] - Optional dataset to match on
6363
* @param {function} cb - Node-style error-first callback function
@@ -156,7 +156,7 @@ <h1 class="page-title">jobs/list.js</h1>
156156
<br class="clear">
157157

158158
<footer>
159-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Apr 06 2018 08:21:01 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
159+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Apr 24 2018 16:35:08 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
160160
</footer>
161161

162162
<script>prettyPrint();</script>

0 commit comments

Comments
 (0)