@inweb/client 25.8.16 → 25.8.20

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.
package/README.md CHANGED
@@ -2,7 +2,19 @@
2
2
 
3
3
  `Client.js` is a JavaScript library implementing the REST API client for [Open Cloud Server](https://cloud.opendesign.com/docs/index.html#/opencloud_server).
4
4
 
5
- This library enables you to integrate the [inWEB Open Cloud](https://www.opendesign.com/products/open-cloud) collaboration tools into your BIM Project management applications, including managing CAD and BIM drawings, creating Projects, Issues etc.
5
+ With `Client.js` you can:
6
+
7
+ - Register on the server as a new user.
8
+ - Create new and manage existing user accounts.
9
+ - Upload and download files from the server.
10
+ - Manage existing files, upload new version of files.
11
+ - Convert files from one format to another.
12
+ - Run validation, clash detection, and custom jobs on the server.
13
+ - Create and manage assemblies.
14
+ - Create projects, manage project models and members.
15
+ - Change server settings.
16
+
17
+ This library is a part of [CDE SDK](https://www.opendesign.com/products/cde) by [Open Design Alliance](https://opendesign.com).
6
18
 
7
19
  ## Installation
8
20
 
@@ -16,6 +28,12 @@ For CDN, you can use [unpkg](https://unpkg.com/) or [jsDelivr](https://www.jsdel
16
28
 
17
29
  The global namespace for `Client.js` is `ODA.Api`.
18
30
 
31
+ ```html
32
+ <script>
33
+ const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });
34
+ </script>
35
+ ```
36
+
19
37
  ### Install via [npm](https://npmjs.org)
20
38
 
21
39
  Open a terminal in your project folder and run:
@@ -28,6 +46,7 @@ The `Client.js` package will be downloaded and installed. Then you're ready to i
28
46
 
29
47
  ```javascript
30
48
  import { Client } from "@inweb/client";
49
+ const client = new Client({ serverUrl: "https://cloud.opendesign.com/api" });
31
50
  ```
32
51
 
33
52
  ## Example
@@ -35,17 +54,19 @@ import { Client } from "@inweb/client";
35
54
  Login to the `Open Cloud Server` and get the file list from the server:
36
55
 
37
56
  ```html
38
- <script src="https://unpkg.com/@inweb/client@25.3/dist/client.js"></script>
39
-
40
- <script>
41
- const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });
42
-
43
- client
44
- .signInWithEmail("email", "password")
45
- .then(() => client.getFiles())
46
- .then((files) => files.result.map((file) => file.name))
47
- .then((names) => console.log(names));
48
- </script>
57
+ <html>
58
+ <body>
59
+ <script src="https://unpkg.com/@inweb/client@25.3/dist/client.js"></script>
60
+ <script>
61
+ const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });
62
+ client
63
+ .signInWithEmail("email", "password")
64
+ .then(() => client.getFiles())
65
+ .then((files) => files.result.map((file) => file.name))
66
+ .then((names) => console.log(names));
67
+ </script>
68
+ </body>
69
+ </html>
49
70
  ```
50
71
 
51
72
  To learn more, see [First application guide](https://cloud.opendesign.com/docs/index.html#/guide).