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

Commit 8e113be

Browse files
committed
rename paperspace-sdk to paperspace-node; PS-4814
1 parent 7f8fe0c commit 8e113be

File tree

7 files changed

+44
-44
lines changed

7 files changed

+44
-44
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Paperspace SDK (v0.0.0)
1+
# Paperspace API (v0.0.0)
22

33
![image](https://cloud.githubusercontent.com/assets/585865/26324445/cdeb6658-3f00-11e7-9a18-3e2070d9a400.png)
44

@@ -8,21 +8,21 @@
88

99
- - - -
1010

11-
The **Paperspace SDK** is the official devkit for automating your [Paperspace](https://paperspace.com) account. It's currently available in JavaScript, and we plan to offer other languages and integrations in the future. For v0, we are offering basic actions such as creating machines and managing team members. This repo includes:
11+
The **Paperspace API** is the official devkit for automating your [Paperspace](https://paperspace.com) account. It's currently available in JavaScript, and we plan to offer other languages and integrations in the future. For v0, we are offering basic actions such as creating machines and managing team members. This repo includes:
1212

1313
* [JavaScript API client](#programmatic) (for Node.js and the browser)
1414
* [CLI](#cli)
15-
* [API documentation](https://paperspace.github.io/paperspace-sdk)
15+
* [API documentation](https://paperspace.github.io/paperspace-node)
1616

1717
## Getting started
1818

19-
Your system will need [Node.js](https://nodejs.org) v4+ installed. Check that you have a recent enough version by running `node -v` in your terminal. Node.js comes bundled with `npm`, the Node.js package management tool, which you'll use to install this SDK.
19+
Your system will need [Node.js](https://nodejs.org) v4+ installed. Check that you have a recent enough version by running `node -v` in your terminal. Node.js comes bundled with `npm`, the Node.js package management tool, which you'll use to install this package.
2020

2121
### Installation
2222

2323
Install the package from npm:
2424

25-
$ npm install -g Paperspace/paperspace-sdk#master
25+
$ npm install -g Paperspace/paperspace-node#master
2626

2727
The reason we recommend installing it globally is so the `paperspace` command will be available on your command line everywhere on your system. If you only want to make it available within an individual Node.js project, you can install it locally by omitting the `-g` flag.
2828

@@ -42,13 +42,13 @@ You can interact with Paperspace's API in three ways: programatically (from with
4242

4343
We'll be illustrating all examples using [ES5](http://speakingjs.com/es5/ch01.html) syntax and the CommonJS module format. For other systems like AMD, consider using a bundler such as Browserify.
4444

45-
Assuming you've installed the `paperspace-sdk` package, you can import the SDK with:
45+
Assuming you've installed the `paperspace-node` package, you can import the package with:
4646

47-
var paperspace_sdk = require('paperspace-sdk');
47+
var paperspace_node = require('paperspace-node');
4848

4949
Then create an instance of the client, passing in your authentication credentials:
5050

51-
var paperspace = paperspace_sdk({
51+
var paperspace = paperspace_node({
5252
apiKey: '0b3c5f...' // <~ Copy+paste your key here
5353
});
5454

@@ -64,11 +64,11 @@ All of the methods are namespaced by category ("machines.create" or "invoices.sh
6464

6565
That is, the first argument is parameters object, and the second is a error-first callback function.
6666

67-
For information on all the methods available, see the [API documentation](https://paperspace.github.io/paperspace-sdk).
67+
For information on all the methods available, see the [API documentation](https://paperspace.github.io/paperspace-node).
6868

6969
### CLI
7070

71-
Assuming you've installed the `paperspace-sdk` package, you can invoke the Paperspace CLI with:
71+
Assuming you've installed the `paperspace-node` package, you can invoke the Paperspace CLI with:
7272

7373
$ paperspace --help
7474

@@ -83,13 +83,13 @@ The CLI provides all methods as subcommands. For example:
8383

8484
$ paperspace machines create --name "My Machine" --size 50 # etc.
8585

86-
For information on all the methods available, see the [API documentation](https://paperspace.github.io/paperspace-sdk).
86+
For information on all the methods available, see the [API documentation](https://paperspace.github.io/paperspace-node).
8787

88-
## [API Documentation](https://paperspace.github.io/paperspace-sdk)
88+
## [API Documentation](https://paperspace.github.io/paperspace-node)
8989

9090
## HTTP endpoints
9191

92-
If you'd prefer to interact with our HTTP API directly, and roll your own client instead of using ours, our HTTP endpoints are also described in our [API documentation](https://paperspace.github.io/paperspace-sdk).
92+
If you'd prefer to interact with our HTTP API directly, and roll your own client instead of using ours, our HTTP endpoints are also described in our [API documentation](https://paperspace.github.io/paperspace-node).
9393

9494
NOTE: the HTTP endpoints are subject to change in the future. We recommend using one of the programmatic APIs whenever possible to maintain forward compatibility.
9595

developers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A brief guide for developers who want to contribute to this repo.
66

77
This repo is responsible for two overall things:
88

9-
* **Docs** covering SDK usage
9+
* **Docs** covering API usage
1010
* **Code** that implements the JavaScript client and CLI
1111

1212
#### Docs
@@ -38,11 +38,11 @@ The CLI handler code is in `cli/index.js`. This is just a very small wrapper ove
3838

3939
##### JavaScript
4040

41-
The entry module for the JavaScript client is `lib/index.js`.
41+
The entry module for the JavaScript client is `lib/index.js`.
4242

4343
Implementation of the individual methods provided by the API are located in the subfolders: `lib/*/*.js`, e.g. `lib/machines/create.js`.
4444

45-
Although the JavaScript entry module loads these individual implementations into a single root interface that can be accessed with `require('paperspace-sdk')`, it is also set up so they can be required a la carte: `require('paperspace-sdk/lib/machines/create')`. Start following the code in `lib/paperspace.js` to understand how this happens.
45+
Although the JavaScript entry module loads these individual implementations into a single root interface that can be accessed with `require('paperspace-node')`, it is also set up so they can be required a la carte: `require('paperspace-node/lib/machines/create')`. Start following the code in `lib/paperspace.js` to understand how this happens.
4646

4747
###### Configuration
4848

docs/index.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,10 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="machin
2626
</nav>
2727

2828
<div id="main">
29-
3029

31-
3230

3331

3432

35-
3633

3734

3835

@@ -42,47 +39,50 @@ <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="machin
4239

4340

4441

45-
42+
43+
44+
45+
4646

4747

4848
<section class="readme">
49-
<article><h1>Paperspace SDK (v0.0.0)</h1><p><img src="https://cloud.githubusercontent.com/assets/585865/26324445/cdeb6658-3f00-11e7-9a18-3e2070d9a400.png" alt="image"></p>
49+
<article><h1>Paperspace API (v0.0.0)</h1><p><img src="https://cloud.githubusercontent.com/assets/585865/26324445/cdeb6658-3f00-11e7-9a18-3e2070d9a400.png" alt="image"></p>
5050
<hr>
5151
<p><strong>Heads up! This project is under construction!</strong> We're offering this early, unstable, pre-alpha release to get early feedback and to see how it might get used in the wild. Use caution: Until we ship a release &gt;= v1.0, expect to encounter bugs, and expect our documentation to be missing or inaccurate in places. We welcome your bug reports and suggestions via GitHub Issues!</p>
5252
<hr>
53-
<p>The <strong>Paperspace SDK</strong> is the official devkit for automating your <a href="https://paperspace.com">Paperspace</a> account. It's currently available in JavaScript, and we plan to offer other languages and integrations in the future. For v0, we are offering basic actions such as creating machines and managing team members. This repo includes:</p>
53+
<p>The <strong>Paperspace API</strong> is the official devkit for automating your <a href="https://paperspace.com">Paperspace</a> account. It's currently available in JavaScript, and we plan to offer other languages and integrations in the future. For v0, we are offering basic actions such as creating machines and managing team members. This repo includes:</p>
5454
<ul>
5555
<li><a href="#programmatic">JavaScript API client</a> (for Node.js and the browser)</li>
5656
<li><a href="#cli">CLI</a></li>
57-
<li><a href="https://paperspace.github.io/paperspace-sdk">API documentation</a></li>
57+
<li><a href="https://paperspace.github.io/paperspace-node">API documentation</a></li>
5858
</ul>
59-
<h2>Getting started</h2><p>Your system will need <a href="https://nodejs.org">Node.js</a> v4+ installed. Check that you have a recent enough version by running <code>node -v</code> in your terminal. Node.js comes bundled with <code>npm</code>, the Node.js package management tool, which you'll use to install this SDK.</p>
59+
<h2>Getting started</h2><p>Your system will need <a href="https://nodejs.org">Node.js</a> v4+ installed. Check that you have a recent enough version by running <code>node -v</code> in your terminal. Node.js comes bundled with <code>npm</code>, the Node.js package management tool, which you'll use to install this package.</p>
6060
<h3>Installation</h3><p>Install the package from npm:</p>
61-
<pre class="prettyprint source"><code>$ npm install -g Paperspace/paperspace-sdk#master</code></pre><p>The reason we recommend installing it globally is so the <code>paperspace</code> command will be available on your command line everywhere on your system. If you only want to make it available within an individual Node.js project, you can install it locally by omitting the <code>-g</code> flag.</p>
61+
<pre class="prettyprint source"><code>$ npm install -g Paperspace/paperspace-node#master</code></pre><p>The reason we recommend installing it globally is so the <code>paperspace</code> command will be available on your command line everywhere on your system. If you only want to make it available within an individual Node.js project, you can install it locally by omitting the <code>-g</code> flag.</p>
6262
<h3>Setup</h3><p>Before you can use this tool, you'll need a <a href="https://paperspace.com">Paperspace account</a>. You'll use this account to obtain Paperspace API keys.</p>
6363
<h3>Obtaining an API key</h3><p>First, sign in to your <a href="https://paperspace.com">Paperspace account</a>. Click 'Launch Console' at top right. From your admin console, you should find an 'Account Info' section. There, you'll find a form where you can create API keys. You'll use the API keys you generate here to authenticate your requests.</p>
6464
<h2>Usage</h2><p>You can interact with Paperspace's API in three ways: programatically (from within JavaScript), from the command line (using the Paperspace CLI), or using an HTTP client of your choice and the Paperspace API HTTP enpoints documented here. The JavaScript libabry and the CLI are backed by the same underlying API client.</p>
6565
<h3>Programmatic</h3><p>We'll be illustrating all examples using <a href="http://speakingjs.com/es5/ch01.html">ES5</a> syntax and the CommonJS module format. For other systems like AMD, consider using a bundler such as Browserify.</p>
66-
<p>Assuming you've installed the <code>paperspace-sdk</code> package, you can import the SDK with:</p>
67-
<pre class="prettyprint source"><code>var paperspace_sdk = require('paperspace-sdk');</code></pre><p>Then create an instance of the client, passing in your authentication credentials:</p>
68-
<pre class="prettyprint source"><code>var paperspace = paperspace_sdk({
66+
<p>Assuming you've installed the <code>paperspace-node</code> package, you can import the package with:</p>
67+
<pre class="prettyprint source"><code>var paperspace_node = require('paperspace-node');</code></pre><p>Then create an instance of the client, passing in your authentication credentials:</p>
68+
<pre class="prettyprint source"><code>var paperspace = paperspace_node({
6969
apiKey: '0b3c5f...' // &lt;~ Copy+paste your key here
7070
});</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>
7171
<pre class="prettyprint source"><code>paperspace.machines.create({
7272
// parameters
7373
}, function (err, resp) {
7474
// callback
7575
});</code></pre><p>That is, the first argument is parameters object, and the second is a error-first callback function.</p>
76-
<p>For information on all the methods available, see the <a href="https://paperspace.github.io/paperspace-sdk">API documentation</a>.</p>
77-
<h3>CLI</h3><p>Assuming you've installed the <code>paperspace-sdk</code> package, you can invoke the Paperspace CLI with:</p>
76+
<p>For information on all the methods available, see the <a href="https://paperspace.github.io/paperspace-node">API documentation</a>.</p>
77+
<h3>CLI</h3><p>Assuming you've installed the <code>paperspace-node</code> package, you can invoke the Paperspace CLI with:</p>
7878
<pre class="prettyprint source"><code>$ paperspace --help</code></pre><p>For authenticated requests, the Paperspace CLI will look in two places:</p>
7979
<ul>
8080
<li>CLI argument: <code>--apiKey</code></li>
8181
<li>Environment variable: <code>PAPERSPACE_API_KEY</code></li>
8282
</ul>
8383
<h4>Calling the API with the CLI</h4><p>The CLI provides all methods as subcommands. For example:</p>
84-
<pre class="prettyprint source"><code>$ paperspace machines create --name &quot;My Machine&quot; --size 50 # etc.</code></pre><p>For information on all the methods available, see the <a href="https://paperspace.github.io/paperspace-sdk">API documentation</a>.</p>
85-
<h2><a href="https://paperspace.github.io/paperspace-sdk">API Documentation</a></h2><h2>HTTP endpoints</h2><p>If you'd prefer to interact with our HTTP API directly, and roll your own client instead of using ours, our HTTP endpoints are also described in our <a href="https://paperspace.github.io/paperspace-sdk">API documentation</a>.</p>
84+
<pre class="prettyprint source"><code>$ paperspace machines create --name &quot;My Machine&quot; --size 50 # etc.</code></pre><p>For information on all the methods available, see the <a href="https://paperspace.github.io/paperspace-node">API documentation</a>.</p>
85+
<h2><a href="https://paperspace.github.io/paperspace-node">API Documentation</a></h2><h2>HTTP endpoints</h2><p>If you'd prefer to interact with our HTTP API directly, and roll your own client instead of using ours, our HTTP endpoints are also described in our <a href="https://paperspace.github.io/paperspace-node">API documentation</a>.</p>
8686
<p>NOTE: the HTTP endpoints are subject to change in the future. We recommend using one of the programmatic APIs whenever possible to maintain forward compatibility.</p>
8787
<h3>Address for HTTP endpoints</h3><p>If making HTTP requests directly to the Paperspace HTTP endpoints use the following address for each request: <code>https://api.paperspace.io</code></p>
8888
<h3>Authenticating to HTTP endpoints</h3><p>In order to use the HTTP API directly you must specify the <code>x-api-key</code> header with the value of the API key obtained using the procedure above.</p>
@@ -113,4 +113,4 @@ <h2>Copyright</h2><p>Copyright :copyright: 2017 Paperspace - All Rights Reserved
113113
<script>prettyPrint();</script>
114114
<script src="scripts/linenumber.js"></script>
115115
</body>
116-
</html>
116+
</html>

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>Paperspace SDK Documentation</title>
5+
<title>Paperspace API Documentation</title>
66
</head>
77
<body style="font-family: sans-serif;">
8-
<h1>Paperspace SDK Documentation</h1>
9-
<p>Documentation for the Paperspace SDK, including API docs and usage examples. See Paperspace/paperspace-sdk on GitHub for more.</p>
8+
<h1>Paperspace API Documentation</h1>
9+
<p>Documentation for the Paperspace API, including API docs and usage examples. See Paperspace/paperspace-node on GitHub for more.</p>
1010
<script>window.location = 'docs/index.html'</script>
1111
</body>
1212
</html>

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "paperspace-sdk",
2+
"name": "paperspace-node",
33
"version": "0.0.0",
4-
"description": "Paperspace SDK",
4+
"description": "Paperspace API for node",
55
"main": "index.js",
6-
"repository": "https://github.com/Paperspace/paperspace-sdk",
6+
"repository": "https://github.com/Paperspace/paperspace-node",
77
"author": "Paperspace <support@paperspace.com>",
88
"license": "ISC",
99
"bin": {

samples/sample_node_app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// Assumes you have installed the paperspace-sdk node package globally.
2-
// Use "require('../../paperspace-sdk')" if running from the repository tree.
3-
var paperspace_sdk = require('paperspace-sdk');
1+
// Assumes you have installed the paperspace-node package globally.
2+
// Use "require('../../paperspace-node')" if running from the repository tree.
3+
var paperspace_node = require('paperspace-node');
44

5-
var paperspace = paperspace_sdk({
5+
var paperspace = paperspace_node({
66
apiKey: '1be4f97...' // Substitue your actual apiKey here
77
});
88

test/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var tape = require('tape');
44
var paperspace = require('./../lib/paperspace');
55

6-
tape('paperspace-sdk', function(t) {
6+
tape('paperspace-node', function(t) {
77
t.plan(2);
88

99
t.ok(paperspace, 'exports an object');

0 commit comments

Comments
 (0)