You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 6, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-8Lines changed: 15 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,11 +56,11 @@ First, sign in to your [Paperspace account](https://paperspace.com). Click 'Laun
56
56
57
57
## Usage
58
58
59
-
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.
59
+
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 library and the CLI are backed by the same underlying API client.
60
60
61
61
### Programmatic
62
62
63
-
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.
63
+
We'll be illustrating all examples using [ES5](http://speakingjs.com/es5/ch01.html) syntax and the CommonJS module format. For other systems like Asynchronous Module Definition, consider using a bundler such as Browserify.
64
64
65
65
First install the `paperspace-node` package in your project directory using:
66
66
@@ -73,7 +73,7 @@ Within your node.js app you can import the package with:
73
73
Then create an instance of the client, passing in your authentication credentials:
74
74
75
75
var paperspace = paperspace_node({
76
-
apiKey: '0b3c5f...' // <~ Copy+paste your key here
76
+
apiKey: '1ba4f98e7c0...' // <- paste your api key here
77
77
});
78
78
79
79
#### Calling the API programmatically
@@ -96,16 +96,23 @@ Assuming you've installed the `paperspace-node` package, you can invoke the Pape
96
96
97
97
$ paperspace --help
98
98
99
-
For authenticated requests, the Paperspace CLI will look in two places:
99
+
For authenticated requests, the Paperspace CLI will look in two places for an api key:
100
+
101
+
1) A command argument: `--apiKey`. Example:
102
+
103
+
$ paperspace machines show --apiKey "1ba4f98e7c0..." --machineId "ps123abc"
104
+
105
+
2) An environment variable: `PAPERSPACE_API_KEY`. Example:
106
+
107
+
$ export PAPERSPACE_API_KEY=1ba4f98e7c0...
108
+
$ paperspace machines show --machineId "ps123abc"
100
109
101
-
- CLI argument: `--apiKey`
102
-
- Environment variable: `PAPERSPACE_API_KEY`
103
110
104
111
#### Calling the API with the CLI
105
112
106
-
The CLI provides all methods as subcommands. For example:
113
+
The CLI provides all methods as subcommands, using this scheme: `paperspace <namespace> <subcommand>`. For example:
107
114
108
-
$ paperspace machines create --name "My Machine" --size 50 # etc.
0 commit comments