JSPM

  • Created
  • Published
  • Downloads 299
  • Score
    100M100P100Q95616F
  • License SEE LICENSE IN LICENSE

JavaScript REST API client for the Open Cloud Server

Package Exports

  • @inweb/client
  • @inweb/client/dist/client.js
  • @inweb/client/dist/client.module.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@inweb/client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Client.js

Client.js is a JavaScript library implementing the REST API client for Open Cloud Server.

This library enables you to integrate the inWEB Open Cloud collaboration tools into your BIM Project management applications, including managing CAD and BIM drawings, creating Projects, Issues etc.

Installation

CDN or static hosting

For CDN, you can use unpkg or jsDelivr (replace 25.3 with a version you need):

<script src="https://unpkg.com/@inweb/client@25.3/dist/client.js"></script>

The global namespace for Client.js is ODA.Api.

Install via npm

Open a terminal in your project folder and run:

npm install @inweb/client

The Client.js package will be downloaded and installed. Then you're ready to import it in your code:

import { Client } from "@inweb/client";

Example

Login to the Open Cloud Server and get the file list from the server:

<script src="https://unpkg.com/@inweb/client@25.3/dist/client.js"></script>

<script>
  const client = new ODA.Api.Client({ serverUrl: "https://cloud.opendesign.com/api" });

  client
    .signInWithEmail("email", "password")
    .then(() => client.getFiles())
    .then((files) => files.result.map((file) => file.name))
    .then((names) => console.log(names));
</script>

To learn more, see First application guide.

Code and documentation copyright 2002-2024 the Open Design Alliance. Code is distributed under a proprietary license, see LICENSE for more information.