Skip to content

Commit 06013d5

Browse files
samples: add get rendering status sample.
1 parent fb6d5dd commit 06013d5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* Copyright (c) 2018-present, Renderforest, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the
6+
* LICENSE file in the root directory.
7+
*/
8+
9+
const RenderforestClient = require('../../lib/client')
10+
11+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
12+
13+
const unsubscribe = Renderforest.getRenderingStatus((error, percentage) => {
14+
if (error) {
15+
console.log(error)
16+
}
17+
// take percentage from here
18+
console.log(percentage)
19+
// if you want in unsubscribe in some case, then you can call unsubscribe method manually
20+
unsubscribe()
21+
})

0 commit comments

Comments
 (0)