Skip to content

Commit 2a0c21a

Browse files
authored
Merge pull request #133 from renderforest/add-docs-pushScreen
add-docs-pushScreen
2 parents 1a2b408 + 4fde8c0 commit 2a0c21a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Welcome to the Renderforest API! You can use our API to:
5050
- [Set video on video holder area](#set-video-on-video-holder-area)
5151
- [Set project colors](#set-project-colors)
5252
- [Set screens](#set-screens)
53+
* [Push Screen](#push-screen)
5354
* [Sounds API](#sounds-api)
5455
- [Get All Sounds](#get-all-sounds)
5556
- [Get Recommended Sounds](#get-recommended-sounds)
@@ -606,6 +607,11 @@ projectDataInstance.setScreens(_screens)
606607

607608
#### Push screen
608609

610+
Inserts new `screen`, arrange screens by `screen.order` property and normalize orders to have consequent numbers.
611+
In case `screen.order` is less than `0`, then inserts the new `screen` at the beginning of screens.
612+
If `screen.order` property is more than last `screen's` order property, then appends to the end of screens.
613+
Throws `MissingOrderError` if `screen.order` property is missing.
614+
609615
```js
610616
const _screens = projectDataInstance.pushScreen(screen) // Array of screens
611617
```

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@renderforest/sdk-node",
33
"description": "Renderforest SDK for Node.js",
4-
"version": "0.3.3",
4+
"version": "0.3.4",
55
"author": "RenderForest LLC",
66
"bugs": {
77
"url": "https://github.com/renderforest/renderforest-sdk-node/issues"

0 commit comments

Comments
 (0)