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

Commit e6e98df

Browse files
committed
doc update
1 parent 045918e commit e6e98df

Some content is hidden

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

48 files changed

+210
-210
lines changed

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ <h3>Programmatic</h3><p>We'll be illustrating all examples using <a href="http:/
109109
});</code></pre><h4>Calling the API programmatically</h4><p>All of the methods are namespaced by category (&quot;machines.create&quot; or &quot;invoices.show&quot;) and have the same function signature. For example:</p>
110110
<pre class="prettyprint source"><code>paperspace.machines.create({
111111
// parameters
112-
}, function (err, resp) {
112+
}, function (err, res) {
113113
// callback
114114
});</code></pre><p>That is, the first argument is parameters object, and the second is a error-first callback function.</p>
115115
<p>For information on all the methods available, see the <a href="https://paperspace.github.io/paperspace-node">API documentation</a>.</p>
@@ -145,7 +145,7 @@ <h2>Copyright</h2><p>Copyright :copyright: 2017 Paperspace - All Rights Reserved
145145
<br class="clear">
146146

147147
<footer>
148-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 02:46:13 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
148+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 12:04:22 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
149149
</footer>
150150

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

docs/jobs.html

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ <h5>Examples</h5>
190190
<pre class="prettyprint"><code>paperspace.jobs.artifactsDestroy({
191191
jobId: 'j123abc',
192192
files: 'myfiles*' // optional
193-
}, function(err, resp) {
194-
// handle error or http response
193+
}, function(err, res) {
194+
// handle error or result
195195
});</code></pre>
196196

197197
<pre class="prettyprint"><code>$ paperspace jobs artifactsDestroy \
@@ -460,8 +460,8 @@ <h5>Examples</h5>
460460
<pre class="prettyprint"><code>paperspace.jobs.artifactsGet({
461461
jobId: 'j123abc',
462462
files: 'myfiles*' // optional
463-
}, function(err, resp) {
464-
// handle error or http response
463+
}, function(err, res) {
464+
// handle error or result
465465
});</code></pre>
466466

467467
<pre class="prettyprint"><code>$ paperspace jobs artifactsGet \
@@ -803,8 +803,8 @@ <h5>Examples</h5>
803803

804804
<pre class="prettyprint"><code>paperspace.jobs.artifactsList({
805805
jobId: 'j123abc',
806-
}, function(err, resp) {
807-
// handle error or http response
806+
}, function(err, res) {
807+
// handle error or result
808808
});</code></pre>
809809

810810
<pre class="prettyprint"><code>$ paperspace jobs artifactsList \
@@ -1106,8 +1106,8 @@ <h5>Examples</h5>
11061106

11071107
<pre class="prettyprint"><code>paperspace.jobs.clone({
11081108
jobId: 'j123abc',
1109-
}, function(err, resp) {
1110-
// handle error or http response
1109+
}, function(err, res) {
1110+
// handle error or result
11111111
});</code></pre>
11121112

11131113
<pre class="prettyprint"><code>$ paperspace jobs clone --jobId "j123abc"</code></pre>
@@ -1336,8 +1336,8 @@ <h5>Examples</h5>
13361336
<pre class="prettyprint"><code>paperspace.jobs.create({
13371337
container: 'http://dockerhub.com/mycontainer',
13381338
machineType: 'P6000',
1339-
}, function(err, resp) {
1340-
// handle error or http response
1339+
}, function(err, res) {
1340+
// handle error or result
13411341
});</code></pre>
13421342

13431343
<pre class="prettyprint"><code>$ paperspace jobs create \
@@ -1921,8 +1921,8 @@ <h5>Examples</h5>
19211921

19221922
<pre class="prettyprint"><code>paperspace.jobs.destroy({
19231923
jobId: 'j123abc',
1924-
}, function(err, resp) {
1925-
// handle error or http response
1924+
}, function(err, res) {
1925+
// handle error or result
19261926
});</code></pre>
19271927

19281928
<pre class="prettyprint"><code>$ paperspace jobs destroy --jobId "j123abc"</code></pre>
@@ -2145,8 +2145,8 @@ <h5>Examples</h5>
21452145

21462146
<pre class="prettyprint"><code>paperspace.jobs.list(
21472147
project: 'MyProject'
2148-
} function(err, resp) {
2149-
// handle error or http response
2148+
} function(err, res) {
2149+
// handle error or result
21502150
});</code></pre>
21512151

21522152
<pre class="prettyprint"><code>$ paperspace jobs list --project "MyProject"</code></pre>
@@ -2694,8 +2694,8 @@ <h5>Examples</h5>
26942694

26952695
<pre class="prettyprint"><code>paperspace.jobs.logs({
26962696
jobId: 'j123abc',
2697-
}, function(err, resp) {
2698-
// handle error or http response
2697+
}, function(err, res) {
2698+
// handle error or result
26992699
});</code></pre>
27002700

27012701
<pre class="prettyprint"><code>$ paperspace jobs logs \
@@ -3069,8 +3069,8 @@ <h5>Examples</h5>
30693069

30703070
<pre class="prettyprint"><code>paperspace.jobs.show({
30713071
jobId: 'j123abc',
3072-
}, function(err, resp) {
3073-
// handle error or http response
3072+
}, function(err, res) {
3073+
// handle error or result
30743074
});</code></pre>
30753075

30763076
<pre class="prettyprint"><code>$ paperspace jobs show \
@@ -3322,8 +3322,8 @@ <h5>Examples</h5>
33223322

33233323
<pre class="prettyprint"><code>paperspace.jobs.stop({
33243324
jobId: 'j123abc',
3325-
}, function(err, resp) {
3326-
// handle error or http response
3325+
}, function(err, res) {
3326+
// handle error or result
33273327
});</code></pre>
33283328

33293329
<pre class="prettyprint"><code>$ paperspace jobs stop --jobId "j123abc"</code></pre>
@@ -3555,8 +3555,8 @@ <h5>Examples</h5>
35553555
<pre class="prettyprint"><code>paperspace.job.waitfor({
35563556
jobId: 'j123abc',
35573557
state: 'Stopped',
3558-
}, function(err, resp) {
3559-
// handle error or http response
3558+
}, function(err, res) {
3559+
// handle error or result
35603560
});</code></pre>
35613561

35623562
<pre class="prettyprint"><code>$ paperspace jobs waitfor \
@@ -3775,7 +3775,7 @@ <h5>Returns:</h5>
37753775
<br class="clear">
37763776

37773777
<footer>
3778-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 02:46:13 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
3778+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 12:04:22 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
37793779
</footer>
37803780

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

docs/jobs_artifactsDestroy.js.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ <h1 class="page-title">jobs/artifactsDestroy.js</h1>
5757
* paperspace.jobs.artifactsDestroy({
5858
* jobId: 'j123abc',
5959
* files: 'myfiles*' // optional
60-
* }, function(err, resp) {
61-
* // handle error or http response
60+
* }, function(err, res) {
61+
* // handle error or result
6262
* });
6363
* @example
6464
* $ paperspace jobs artifactsDestroy \
@@ -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 Thu Dec 14 2017 02:46:13 GMT-0500 (EST) 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 Thu Dec 14 2017 12:04:22 GMT-0500 (EST) 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ <h1 class="page-title">jobs/artifactsGet.js</h1>
6464
* paperspace.jobs.artifactsGet({
6565
* jobId: 'j123abc',
6666
* files: 'myfiles*' // optional
67-
* }, function(err, resp) {
68-
* // handle error or http response
67+
* }, function(err, res) {
68+
* // handle error or result
6969
* });
7070
* @example
7171
* $ paperspace jobs artifactsGet \
@@ -277,7 +277,7 @@ <h1 class="page-title">jobs/artifactsGet.js</h1>
277277
<br class="clear">
278278

279279
<footer>
280-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 02:46:13 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
280+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 12:04:22 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
281281
</footer>
282282

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

docs/jobs_artifactsList.js.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ <h1 class="page-title">jobs/artifactsList.js</h1>
5656
* @example
5757
* paperspace.jobs.artifactsList({
5858
* jobId: 'j123abc',
59-
* }, function(err, resp) {
60-
* // handle error or http response
59+
* }, function(err, res) {
60+
* // handle error or result
6161
* });
6262
* @example
6363
* $ paperspace jobs artifactsList \
@@ -118,7 +118,7 @@ <h1 class="page-title">jobs/artifactsList.js</h1>
118118
<br class="clear">
119119

120120
<footer>
121-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 02:46:13 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
121+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 12:04:22 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
122122
</footer>
123123

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

docs/jobs_clone.js.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ <h1 class="page-title">jobs/clone.js</h1>
5353
* @example
5454
* paperspace.jobs.clone({
5555
* jobId: 'j123abc',
56-
* }, function(err, resp) {
57-
* // handle error or http response
56+
* }, function(err, res) {
57+
* // handle error or result
5858
* });
5959
* @example
6060
* $ paperspace jobs clone --jobId "j123abc"
@@ -75,10 +75,10 @@ <h1 class="page-title">jobs/clone.js</h1>
7575

7676
function clone(params, cb) {
7777
params.jobId = projectConfig.getLastJobId(null, params.jobId);
78-
return method(clone, params, function _methodCb(err, resp) {
78+
return method(clone, params, function _methodCb(err, res) {
7979
if (err) return cb(err);
80-
if (resp) projectConfig.setLastJobId(resp.project, resp.id);
81-
return cb(err, resp);
80+
if (res) projectConfig.setLastJobId(res.project, res.id);
81+
return cb(err, res);
8282
});
8383
}
8484

@@ -107,7 +107,7 @@ <h1 class="page-title">jobs/clone.js</h1>
107107
<br class="clear">
108108

109109
<footer>
110-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 02:46:13 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
110+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 12:04:22 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
111111
</footer>
112112

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

docs/jobs_create.js.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ <h1 class="page-title">jobs/create.js</h1>
7474
* paperspace.jobs.create({
7575
* container: 'http://dockerhub.com/mycontainer',
7676
* machineType: 'P6000',
77-
* }, function(err, resp) {
78-
* // handle error or http response
77+
* }, function(err, res) {
78+
* // handle error or result
7979
* });
8080
* @example
8181
* $ paperspace jobs create \
@@ -252,37 +252,37 @@ <h1 class="page-title">jobs/create.js</h1>
252252
return cb(err);
253253
}
254254

255-
function maybeTailLogs(err, resp) {
255+
function maybeTailLogs(err, res) {
256256
if (global.paperspace_cli &amp;&amp; !json &amp;&amp; tail) {
257257
if (err) return cb(err);
258-
if (!resp.id) return new Error('Job create failed; job id not found.');
259-
var jobId = resp.id;
260-
console.log('New jobId: ' + resp.id);
261-
console.log('Job ' + resp.state);
262-
if (resp.state === 'Pending') console.log('Waiting for job to run...');
263-
return jobs_waitfor({ jobId: jobId, state: 'Running' }, function _waitforCb(err, resp) {
258+
if (!res.id) return new Error('Job create failed; job id not found.');
259+
var jobId = res.id;
260+
console.log('New jobId: ' + res.id);
261+
console.log('Job ' + res.state);
262+
if (res.state === 'Pending') console.log('Waiting for job to run...');
263+
return jobs_waitfor({ jobId: jobId, state: 'Running' }, function _waitforCb(err, res) {
264264
if (err) return cb(err);
265-
if (!resp.state) return new Error('Job state not found.');
266-
var state = resp.state;
265+
if (!res.state) return new Error('Job state not found.');
266+
var state = res.state;
267267
console.log('Job ' + state);
268268
if (state !== 'Stopped' &amp;&amp; state !== 'Failed' &amp;&amp; state !== 'Running') {
269-
if (state === 'Error' || resp.jobError) console.log('Error: ' + resp.jobError);
269+
if (state === 'Error' || res.jobError) console.log('Error: ' + res.jobError);
270270
return cb();
271271
}
272272
console.log('Awaiting logs...');
273273
return jobs_logs({ jobId: jobId, tail: true }, function _logsCb(err) {
274274
if (err) return cb(err);
275-
return jobs_show({ jobId: jobId }, function _showCb(err, resp) {
275+
return jobs_show({ jobId: jobId }, function _showCb(err, res) {
276276
if (err) return cb(err);
277-
if (!resp.state) return new Error('Job state not found.');
278-
console.log('Job ' + resp.state + (resp.exitCode || resp.exitCode === 0 ? ', exitCode ' + resp.exitCode : ''));
279-
if (resp.state === 'Error' || resp.jobError) console.log('Error: ' + resp.jobError);
277+
if (!res.state) return new Error('Job state not found.');
278+
console.log('Job ' + res.state + (res.exitCode || res.exitCode === 0 ? ', exitCode ' + res.exitCode : ''));
279+
if (res.state === 'Error' || res.jobError) console.log('Error: ' + res.jobError);
280280
return cb();
281281
});
282282
});
283283
});
284284
}
285-
return cb(err, resp);
285+
return cb(err, res);
286286
}
287287

288288
// don't allow zipping of the root directory
@@ -331,10 +331,10 @@ <h1 class="page-title">jobs/create.js</h1>
331331

332332
// save workspace file name as a extra parameter since we are not using multer to parse the files on the server
333333
params.workspaceFileName = path.basename(params.workspace);
334-
return method(create, params, function _methodCb(err, resp) {
334+
return method(create, params, function _methodCb(err, res) {
335335
if (err) return cb(err);
336-
if (resp) projectConfig.setLastJobId(resp.project, resp.id);
337-
return maybeTailLogs(err, resp);
336+
if (res) projectConfig.setLastJobId(res.project, res.id);
337+
return maybeTailLogs(err, res);
338338
});
339339
});
340340

@@ -406,10 +406,10 @@ <h1 class="page-title">jobs/create.js</h1>
406406

407407
// save workspace file name as a extra parameter since we are not using multer to parse the files on the server
408408
params.workspaceFileName = path.basename(params.workspace);
409-
return method(create, params, function _methodCb(err, resp) {
409+
return method(create, params, function _methodCb(err, res) {
410410
if (err) return cb(err);
411-
if (resp) projectConfig.setLastJobId(resp.project, resp.id);
412-
return maybeTailLogs(err, resp);
411+
if (res) projectConfig.setLastJobId(res.project, res.id);
412+
return maybeTailLogs(err, res);
413413
});
414414
}
415415
} else {
@@ -420,10 +420,10 @@ <h1 class="page-title">jobs/create.js</h1>
420420

421421
// don't try to upload it; we normally attempt to upload anything in the workspace param specified in assign() below
422422
delete params.workspace;
423-
return method(create, params, function _methodCb(err, resp) {
423+
return method(create, params, function _methodCb(err, res) {
424424
if (err) return cb(err);
425-
if (resp) projectConfig.setLastJobId(resp.project, resp.id);
426-
return maybeTailLogs(err, resp);
425+
if (res) projectConfig.setLastJobId(res.project, res.id);
426+
return maybeTailLogs(err, res);
427427
});
428428
}
429429
}
@@ -460,7 +460,7 @@ <h1 class="page-title">jobs/create.js</h1>
460460
<br class="clear">
461461

462462
<footer>
463-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 02:46:13 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
463+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 12:04:22 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
464464
</footer>
465465

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

docs/jobs_destroy.js.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ <h1 class="page-title">jobs/destroy.js</h1>
5555
* @example
5656
* paperspace.jobs.destroy({
5757
* jobId: 'j123abc',
58-
* }, function(err, resp) {
59-
* // handle error or http response
58+
* }, function(err, res) {
59+
* // handle error or result
6060
* });
6161
* @example
6262
* $ paperspace jobs destroy --jobId "j123abc"
@@ -71,10 +71,10 @@ <h1 class="page-title">jobs/destroy.js</h1>
7171
function destroy(params, cb) {
7272
params.jobId = projectConfig.getLastJobId(null, params.jobId);
7373
var lastJobId = params.jobId;
74-
return method(destroy, params, function _methodCb(err, resp) {
74+
return method(destroy, params, function _methodCb(err, res) {
7575
if (err) return cb(err);
7676
projectConfig.removeLastJobId(lastJobId);
77-
return cb(err, resp);
77+
return cb(err, res);
7878
});
7979
}
8080

@@ -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 Thu Dec 14 2017 02:46:13 GMT-0500 (EST) 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 Thu Dec 14 2017 12:04:22 GMT-0500 (EST) 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
@@ -68,7 +68,7 @@ <h1 class="page-title">jobs/index.js</h1>
6868
<br class="clear">
6969

7070
<footer>
71-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 02:46:13 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
71+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Thu Dec 14 2017 12:04:22 GMT-0500 (EST) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
7272
</footer>
7373

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

0 commit comments

Comments
 (0)