@bytescale/sdk 1.0.0-alpha.5 → 1.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -35
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -32,15 +32,13 @@ npm install node-fetch
32
32
  ### Upload a File
33
33
 
34
34
  ```javascript
35
- import * as Upload from "@bytescale/sdk";
35
+ import * as Bytescale from "@bytescale/sdk";
36
36
  import fetch from "node-fetch"; // Node.js only.
37
37
 
38
- const uploadManager = new Upload.UploadManager(
39
- new Upload.Configuration({
40
- fetchApi: fetch, // 'fetch as any' for TypeScript
41
- apiKey: "YOUR_UPLOAD_API_KEY" // e.g. "secret_xxxxx"
42
- })
43
- );
38
+ const uploadManager = new Bytescale.UploadManager({
39
+ fetchApi: fetch, // 'fetch as any' for TypeScript
40
+ apiKey: "YOUR_BYTESCALE_API_KEY" // e.g. "secret_xxxxx"
41
+ });
44
42
 
45
43
  uploadManager
46
44
  .upload({
@@ -62,15 +60,13 @@ uploadManager
62
60
  ### Download a File
63
61
 
64
62
  ```javascript
65
- import * as Upload from "@bytescale/sdk";
63
+ import * as Bytescale from "@bytescale/sdk";
66
64
  import fetch from "node-fetch"; // Node.js only.
67
65
 
68
- const fileApi = new Upload.FileApi(
69
- new Upload.Configuration({
70
- fetchApi: fetch, // 'fetch as any' for TypeScript
71
- apiKey: "YOUR_UPLOAD_API_KEY" // e.g. "secret_xxxxx"
72
- })
73
- );
66
+ const fileApi = new Bytescale.FileApi({
67
+ fetchApi: fetch, // 'fetch as any' for TypeScript
68
+ apiKey: "YOUR_BYTESCALE_API_KEY" // e.g. "secret_xxxxx"
69
+ });
74
70
 
75
71
  fileApi
76
72
  .downloadFile({
@@ -89,15 +85,13 @@ fileApi
89
85
  ### Process a File
90
86
 
91
87
  ```javascript
92
- import * as Upload from "@bytescale/sdk";
88
+ import * as Bytescale from "@bytescale/sdk";
93
89
  import fetch from "node-fetch"; // Node.js only.
94
90
 
95
- const fileApi = new Upload.FileApi(
96
- new Upload.Configuration({
97
- fetchApi: fetch, // 'fetch as any' for TypeScript
98
- apiKey: "YOUR_UPLOAD_API_KEY" // e.g. "secret_xxxxx"
99
- })
100
- );
91
+ const fileApi = new Bytescale.FileApi({
92
+ fetchApi: fetch, // 'fetch as any' for TypeScript
93
+ apiKey: "YOUR_BYTESCALE_API_KEY" // e.g. "secret_xxxxx"
94
+ });
101
95
 
102
96
  fileApi
103
97
  .processFile({
@@ -126,15 +120,13 @@ fileApi
126
120
  ### Get File Details
127
121
 
128
122
  ```javascript
129
- import * as Upload from "@bytescale/sdk";
123
+ import * as Bytescale from "@bytescale/sdk";
130
124
  import fetch from "node-fetch"; // Node.js only.
131
125
 
132
- const fileApi = new Upload.FileApi(
133
- new Upload.Configuration({
134
- fetchApi: fetch, // 'fetch as any' for TypeScript
135
- apiKey: "YOUR_UPLOAD_API_KEY" // e.g. "secret_xxxxx"
136
- })
137
- );
126
+ const fileApi = new Bytescale.FileApi({
127
+ fetchApi: fetch, // 'fetch as any' for TypeScript
128
+ apiKey: "YOUR_BYTESCALE_API_KEY" // e.g. "secret_xxxxx"
129
+ });
138
130
 
139
131
  fileApi
140
132
  .getFileDetails({
@@ -150,15 +142,13 @@ fileApi
150
142
  ### List Folder
151
143
 
152
144
  ```javascript
153
- import * as Upload from "@bytescale/sdk";
145
+ import * as Bytescale from "@bytescale/sdk";
154
146
  import fetch from "node-fetch"; // Node.js only.
155
147
 
156
- const folderApi = new Upload.FolderApi(
157
- new Upload.Configuration({
158
- fetchApi: fetch, // 'fetch as any' for TypeScript
159
- apiKey: "YOUR_UPLOAD_API_KEY" // e.g. "secret_xxxxx"
160
- })
161
- );
148
+ const folderApi = new Bytescale.FolderApi({
149
+ fetchApi: fetch, // 'fetch as any' for TypeScript
150
+ apiKey: "YOUR_BYTESCALE_API_KEY" // e.g. "secret_xxxxx"
151
+ });
162
152
 
163
153
  folderApi
164
154
  .listFolder({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytescale/sdk",
3
- "version": "1.0.0-alpha.5",
3
+ "version": "1.0.0-alpha.6",
4
4
  "description": "Bytescale JavaScript SDK",
5
5
  "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",
6
6
  "license": "MIT",
@@ -20,7 +20,7 @@
20
20
  "default": "./dist/node/esm/main.mjs"
21
21
  }
22
22
  },
23
- "homepage": "https://github.com/bytescale/bytescale-javascript-sdk",
23
+ "homepage": "https://www.bytescale.com/docs/sdks/javascript",
24
24
  "repository": {
25
25
  "type": "git",
26
26
  "url": "git+https://github.com/bytescale/bytescale-javascript-sdk.git"