0.0.167 • Published 5 years ago

bimserverapi v0.0.167

Weekly downloads
12
License
AGPL-3.0
Repository
github
Last release
5 years ago

BIMserver-JavaScript-API

A JavaScript API for the OpenSource BIMserver.

Usage

Static import

Download the combined minified library and include it in your HTML.

<script type="module" src="bimserverapi.js?_v=%VERSION%"></script>

The ?_v=%VERSION% addition is there for efficient caching purposes. Any server system serving these files can tell the client to cache these files indefinitely.

Import as an ES6 module

If you are using a transpiler such as Typescript or Babel, or a bundler such as Webpack or Rollup, you can import the module using the Import syntax.

It is also possible to load the ES6 module directly into the browser, however not all browser support this yet.

import { BimServerClient } from './js/bimserverclient.js';
const api = new BimServerClient("../..");
api.init((client, version) => {
	console.log(version.version);
});

Dynamic import

When the location on the API is not known in advance, you can use dynamic loading, in most browsers you'll need to use a "dev" version for this to work (Chrome 64 for example).

var address = "http://addressofapi";
Promise.all([
	address + "/bimserverclient.js",
	address + "/bimserverapipromise.js"
].map(x => import(x)))
.then(([BimServerClient, BimServerApiPromise]) => {
	var api = new BimServerClient.BimServerClient("../..");
	api.init((client, version) => {
		document.getElementById("version").innerHTML = JSON.stringify(version.version, 0, 2);
	});
});

Version returned from BIMserver instance

To do.

API documentation

To do.

Build the library

  • Install Node.js
  • Clone (or download and unzip) the project to your file system:
git clone https://github.com/opensourceBIM/BIMserver-JavaScript-API.git
  • Go to the project directory
cd BIMserver-JavaScript-API
  • Install build dependencies
npm install
  • Run the build script
npm run build

The compiled file is located at build/bimserverapi.js

0.0.167

5 years ago

0.0.166

5 years ago

0.0.165

5 years ago

0.0.164

5 years ago

0.0.163

5 years ago

0.0.162

5 years ago

0.0.161

5 years ago

0.0.160

5 years ago

0.0.159

5 years ago

0.0.158

5 years ago

0.0.157

5 years ago

0.0.156

5 years ago

0.0.155

5 years ago

0.0.154

5 years ago

0.0.152

5 years ago

0.0.151

5 years ago

0.0.150

5 years ago

0.0.149

6 years ago

0.0.148

6 years ago

0.0.147

6 years ago

0.0.140

6 years ago

0.0.139

6 years ago

0.0.138

6 years ago

0.0.137

6 years ago

0.0.61

7 years ago

0.0.95

8 years ago

0.0.94

8 years ago

0.0.93

8 years ago

0.0.92

8 years ago

0.0.91

8 years ago

0.0.90

8 years ago

0.0.89

8 years ago

0.0.87

8 years ago

0.0.86

8 years ago

0.0.85

8 years ago

0.0.84

8 years ago

0.0.83

8 years ago

0.0.82

8 years ago

0.0.81

8 years ago

0.0.79

8 years ago

0.0.78

8 years ago

0.0.75

8 years ago

0.0.74

8 years ago

0.0.73

8 years ago

0.0.72

8 years ago

0.0.71

8 years ago

0.0.70

8 years ago

0.0.68

8 years ago

0.0.66

8 years ago

0.0.65

8 years ago

0.0.60

8 years ago

0.0.59

8 years ago

0.0.58

8 years ago

0.0.57

8 years ago

0.0.56

8 years ago

0.0.55

8 years ago

0.0.54

8 years ago

0.0.53

8 years ago

0.0.52

8 years ago

0.0.51

8 years ago

0.0.50

8 years ago

0.0.49

8 years ago

0.0.48

8 years ago

0.0.47

8 years ago

0.0.46

8 years ago

0.0.45

8 years ago

0.0.44

8 years ago

0.0.43

8 years ago

0.0.42

8 years ago

0.0.41

8 years ago

0.0.40

8 years ago

0.0.39

8 years ago

0.0.38

8 years ago

0.0.37

8 years ago

0.0.36

8 years ago

0.0.34

8 years ago

0.0.33

8 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago