Unable to read undefined property call

The call IO3D.servicesresults in:

Uncaught (in promise) TypeError: Cannot read property 'call' of undefined

Version: https://3d.io 1.0.0-beta.22 (@master # 274adf0 2017/08/02 10:16)

What I tried:

IO3D.services.call('Model.search', {
    arguments: {
        organizationResourceId: <my_organisationResourceId>,
        folderResourceName: '<my_folder_name>',
    },
}).then(console.log)

So, api services are not yet available?

+4
source share
2 answers

to directly call the APIs:

IO3D.utils.services.call( )

sample on jsfiddle: https://jsfiddle.net/0f6n8wp0/

Function

services.call in the library: https://github.com/archilogic-com/3dio-js/blob/master/src/utils.js#L24

+3
source

While it is available only as an experimental function:

IO3D.utils.services.call('Model.search', {
  arguments: {
    organizationResourceName: 'template',
    folderResourceName: 'default',
  },
}).then(console.log)

JsFddile: https://jsfiddle.net/3dio/ykut9gx1/

After the experimental stage, we have in our own namespace something like IO3D.scene.search(…)

+1
source

Source: https://habr.com/ru/post/1682856/


All Articles