feat(objectloader): added example usage for new func in readme

This commit is contained in:
Dimitrie Stefanescu
2021-05-26 13:03:22 +01:00
parent 46e2cf7d53
commit 88f20d7e0d
4 changed files with 46 additions and 16 deletions
+1 -15
View File
@@ -1,15 +1 @@
import ObjectLoader from '../../index.js'
// https://latest.speckle.dev/streams/92b620fb17/objects/7cd9d41b5b5f3c8908536aec2a05f1a1
let loader = new ObjectLoader({
serverUrl:"https://latest.speckle.dev",
streamId:"92b620fb17",
objectId:"878c426bb213ddb4d580da74922a2b16"
})
let obj = await loader.getAndConstructObject((e)=>{
console.log(e)
})
console.log('Done!')
console.log(obj)
// NOTE: This lib is not working in node, because node-fetch returns node-native readable streams - we need a workaround first.