Skip to content

Commit cc865f4

Browse files
doc: update project data api doc according to new pattern.
1 parent 781f476 commit cc865f4

File tree

1 file changed

+46
-58
lines changed

1 file changed

+46
-58
lines changed

docs/project-data-api/PROJECT_DATA_API.md

Lines changed: 46 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
1-
## Projects-data API
2-
3-
- [Get Project-data](#get-project-data)
4-
- [Update Project-data](#update-project-data)
5-
* [Getters](#getters)
6-
- [Get project id](#get-project-id)
7-
- [Get template id](#get-template-id)
8-
- [Check if project is Equalizer](#check-if-project-is-equalizer)
9-
- [Check if project is Lego](#check-if-project-is-lego)
10-
- [Get project title](#get-project-title)
11-
- [Get mute music](#get-mute-music)
12-
- [Get project sounds](#get-project-sounds)
13-
- [Get project styles](#get-project-styles)
14-
- [Get project voice over](#get-project-voice-over)
15-
- [Get project fonts](#get-project-fonts)
16-
- [Get project colors](#get-project-colors)
17-
- [Get project duration](#get-project-duration)
18-
- [Get screen](#get-screen)
19-
- [Get screens](#get-screens)
20-
* [Setters](#setters)
21-
- [Set mute music](#set-mute-music)
22-
- [Set project styles](#set-project-styles)
23-
- [Set project voice over](#set-project-voice-over)
24-
- [Set project sounds](#set-project-sounds)
25-
- [Set project colors](#set-project-colors)
26-
- [Set project fonts](#set-project-fonts)
27-
- [Reset project fonts](#reset-project-fonts)
28-
* [Save changes](#save-changes)
1+
# Projects-data API
2+
3+
## Table of Contents
4+
5+
- [Projects-data API](#projects-data-api)
6+
- [Table of Contents](#table-of-contents)
7+
- [Get Project-data](#get-project-data)
8+
- [Getters and Setters of Project-data Instance](#getters-and-setters-of-project-data-instance)
9+
- [Getters](#getters)
10+
- [Get project id](#get-project-id)
11+
- [Get template id](#get-template-id)
12+
- [Check if project is Equalizer](#check-if-project-is-equalizer)
13+
- [Check if project is Lego](#check-if-project-is-lego)
14+
- [Get project title](#get-project-title)
15+
- [Get mute music](#get-mute-music)
16+
- [Get project sounds](#get-project-sounds)
17+
- [Get project styles](#get-project-styles)
18+
- [Get project voice over](#get-project-voice-over)
19+
- [Get project fonts](#get-project-fonts)
20+
- [Get project colors](#get-project-colors)
21+
- [Get project duration](#get-project-duration)
22+
- [Get screen](#get-screen)
23+
- [Get screens](#get-screens)
24+
- [Setters](#setters)
25+
- [Set mute music](#set-mute-music)
26+
- [Set project styles](#set-project-styles)
27+
- [Set project voice over](#set-project-voice-over)
28+
- [Set project sounds](#set-project-sounds)
29+
- [Set project colors](#set-project-colors)
30+
- [Set project fonts](#set-project-fonts)
31+
- [Reset project fonts](#reset-project-fonts)
32+
- [Push screen](#push-screen)
33+
- [Save changes](#save-changes)
2934

3035
### Get Project-data
3136

@@ -57,36 +62,7 @@ Renderforest.getProjectData(7096113)
5762
})
5863
.catch(console.error) // handle the error
5964
```
60-
[See example](/samples/project-data/get-project-data.js)
61-
62-
### Update project data
63-
64-
```js
65-
const RenderforestClient = require('@renderforest/sdk-node')
66-
67-
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
68-
69-
Renderforest.getProjectData(7125672)
70-
.then((projectDataInstance) =>
71-
projectDataInstance.setMuteMusic(true)
72-
.setStyles({ theme: '1', transition: '2' })
73-
.setVoiceOver({ path: 'https://example.com/voice-ower.mp3' })
74-
.save()
75-
)
76-
.catch(console.error)
77-
```
78-
79-
- You can update the following list of properties: `currentScreenId, duration, generator, muteMusic, themeVariableName,
80-
themeVariableValue, projectColors, simple, sounds, screens, voiceSoundId`.
81-
- Any top-level properties (writable) can be updated separately (except `themeVariableName` & `themeVariableValue`), as
82-
well as all of them at the same time.
83-
- The `themeVariableName` & `themeVariableValue` are related to the template theme and both should be updated at the same
84-
time. Possible values you can get in the template theme section
85-
(https://developers.renderforest.com/#get-theme-of-the-template).
86-
- The `iconAdjustable` field of the screen takes one of the 0, 1 or 2 values. If iconAdjustable is 0, then the icon is
87-
not adjustable. The value 1 indicates that the icon is on the left side, and the value 2 indicates that the icon is on
88-
the right side. You can update 1 <-> 2 to change the icon from left <-> right.
89-
- No blob data accepted for the value field of a screen area.
65+
[See get project data example](/samples/project-data/get-project-data.js)
9066

9167
### Getters and Setters of Project-data Instance
9268

@@ -321,6 +297,18 @@ Renderforest.getProjectData(15220886)
321297
.catch(console.error)
322298
```
323299

300+
- You can update the following list of properties: `currentScreenId, duration, generator, muteMusic, themeVariableName,
301+
themeVariableValue, projectColors, simple, sounds, screens, voiceSoundId`.
302+
- Any top-level properties (writable) can be updated separately (except `themeVariableName` & `themeVariableValue`), as
303+
well as all of them at the same time.
304+
- The `themeVariableName` & `themeVariableValue` are related to the template theme and both should be updated at the same
305+
time. Possible values you can get in the template theme section
306+
(https://developers.renderforest.com/#get-theme-of-the-template).
307+
- The `iconAdjustable` field of the screen takes one of the 0, 1 or 2 values. If iconAdjustable is 0, then the icon is
308+
not adjustable. The value 1 indicates that the icon is on the left side, and the value 2 indicates that the icon is on
309+
the right side. You can update 1 <-> 2 to change the icon from left <-> right.
310+
- No blob data accepted for the value field of a screen area.
311+
324312
- [See update project data example](/samples/project-data/update-project-data-partial.js)
325313

326314
**[⬆ back to the top](#projects-data-api)**

0 commit comments

Comments
 (0)