Skip to content

Commit 1b0965d

Browse files
Merge pull request #164 from renderforest/lower-third-settigns
lower-third-settings-and-refactor
2 parents fe72ee4 + c3f5019 commit 1b0965d

File tree

86 files changed

+2945
-3237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2945
-3237
lines changed

README.md

Lines changed: 11 additions & 997 deletions
Large diffs are not rendered by default.

docs/PROJECTS_API.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
## Projects API
2+
3+
- [Get All Projects](#get-all-projects)
4+
- [Add Project](#add-project)
5+
- [Get Trial Project](#get-trial-project)
6+
- [Get a Specific Project](#get-a-specific-project)
7+
- [Update the Project - partial update](#update-the-project---partial-update)
8+
- [Delete a Specific Project](#delete-a-specific-project)
9+
- [Delete Specific Project Videos](#delete-specific-project-videos)
10+
- [Apply Template Preset on the Project](#apply-template-preset-on-the-project)
11+
- [Duplicate the Project](#duplicate-the-project)
12+
- [Render the Project](#render-the-project)
13+
14+
### Get All Projects
15+
16+
Retrieves the projects.
17+
```js
18+
const RenderforestClient = require('@renderforest/sdk-node')
19+
20+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
21+
22+
Renderforest.getProjects({
23+
limit: 2,
24+
offset: 10,
25+
includeApiProjects: false,
26+
order: 'DESC',
27+
orderBy: 'order',
28+
search: ''
29+
})
30+
.then(console.log) // handle the success
31+
.catch(console.error) // handle the error
32+
```
33+
- The renderedQualities property is optional and present if the project is in renders queue (ongoing rend).
34+
- All the properties of `payload` object are optional.
35+
36+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/get-projects.js)
37+
38+
39+
### Add Project
40+
41+
Creates a project.
42+
```js
43+
const RenderforestClient = require('@renderforest/sdk-node')
44+
45+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
46+
47+
Renderforest.addProject(701)
48+
.then(console.log) // handle the success
49+
.catch(console.error) // handle the error
50+
```
51+
- Also, project-data is created with the following list of initial properties:
52+
templateId, title, duration, equalizer, isLego, extendableScreens, fps, projectVersion, screens, muteMusic,
53+
currentScreenId, projectColors (optional), themeVariableName (optional), themeVariableValue (optional).
54+
55+
56+
- The "muteMusic" is false initially.
57+
- If template is lego ("isLego": true), then no initial screen is added and "screens" defaults to []. Otherwise, at least one screen is present.
58+
- The "currentScreenId" is the id of the first screen for non-lego templates & null for lego templates.
59+
- The "projectColors" is optional and gets value if the template has default colors. Both lego & non-lego templates might have default colors.
60+
- Both "themeVariableName" & "themeVariableValue" are optional and are added (both) if template has theme. Both lego & non-lego templates might have a theme.
61+
62+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/add-project.js)
63+
64+
65+
### Get Trial Project
66+
67+
This endpoint retrieves a trial project. Designed to allow the user to make a project (trial - without saving) before
68+
getting logged in to get an overall idea.
69+
The data can be used later to create real project (create project, update project-data with this data).
70+
71+
_No authorization is required for this endpoint._
72+
```js
73+
const RenderforestClient = require('@renderforest/sdk-node')
74+
75+
RenderforestClient.getTrialProject(701)
76+
.then(console.log) // handle the success
77+
.catch(console.error) // handle the error
78+
79+
```
80+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/get-trial-project.js)
81+
82+
83+
### Get a Specific Project
84+
85+
Gets a specific project.
86+
```js
87+
const RenderforestClient = require('@renderforest/sdk-node')
88+
89+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
90+
91+
Renderforest.getProject(5000295)
92+
.then(console.log) // handle the success
93+
.catch(console.error) // handle the error
94+
```
95+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/get-project.js)
96+
97+
98+
### Update the Project - partial update
99+
100+
Updates the project (partial update).
101+
```js
102+
const RenderforestClient = require('@renderforest/sdk-node')
103+
104+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
105+
106+
Renderforest.updateProjectPartial(5000658, { customTitle: 'Graduation' })
107+
.then(console.log) // handle the success
108+
.catch(console.error) // handle the error
109+
```
110+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/update-project-partial.js)
111+
112+
113+
### Delete a Specific Project
114+
115+
Deletes a specific project.
116+
```js
117+
const RenderforestClient = require('@renderforest/sdk-node')
118+
119+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
120+
121+
Renderforest.deleteProject(5000658)
122+
.then(console.log) // handle the success
123+
.catch(console.error) // handle the error
124+
125+
```
126+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/delete-project.js)
127+
128+
129+
### Delete Specific Project Videos
130+
131+
Deletes specific project videos. The quality parameter is optional.
132+
133+
**IMPORTANT**: If you want to delete only a single quality video, you have to specify quality parameter,
134+
otherwise all quality videos of the project will be deleted.
135+
136+
```js
137+
const RenderforestClient = require('@renderforest/sdk-node')
138+
139+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
140+
141+
Renderforest.deleteProjectVideos(4120385, 360)
142+
.then(console.log) // handle the success
143+
.catch(console.error) // handle the error
144+
```
145+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/delete-project-videos.js)
146+
147+
148+
### Apply Template Preset on the Project
149+
150+
Applies template preset on the project.
151+
```js
152+
const RenderforestClient = require('@renderforest/sdk-node')
153+
154+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
155+
156+
Renderforest.applyTemplatePresetOnProject(5000658, 55)
157+
.then(console.log) // handle the success
158+
.catch(console.error) // handle the error
159+
```
160+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/apply-template-preset-on-project.js)
161+
162+
163+
### Duplicate the Project
164+
165+
Duplicates the project.
166+
```js
167+
const RenderforestClient = require('@renderforest/sdk-node')
168+
169+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
170+
171+
Renderforest.duplicateProject(5000658)
172+
.then(console.log) // handle the success
173+
.catch(console.error) // handle the error
174+
```
175+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/duplicate-project.js)
176+
177+
178+
### Render the Project
179+
180+
Renders the project with given quality. The possible values for the quality are: 0, 360, 720, and 1080.
181+
The watermark parameter is optional, must be in '.png' file format and have canvas size of 1920 x 1080 pixels,
182+
url length must not exceed 250 characters.
183+
184+
```js
185+
const RenderforestClient = require('@renderforest/sdk-node')
186+
187+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
188+
189+
Renderforest.renderProject(4120385, { quality: 360, watermark: 'https://example.com/watermark.png' })
190+
.then(console.log) // handle the success
191+
.catch(console.error) // handle the error
192+
193+
```
194+
- The possible values of the quality are: 0, 360, 720, and 1080.
195+
196+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/render-project.js)
197+
198+
**[⬆ back to the top](#projects-api)**

docs/SOUNDS_API.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
## Sounds API
2+
3+
- [Get All Sounds](#get-all-sounds)
4+
- [Get Recommended Sounds](#get-recommended-sounds)
5+
6+
### Get All Sounds
7+
8+
Retrieves sounds given the duration.
9+
10+
If the authorization is not present, then response limits to 5.
11+
```js
12+
const RenderforestClient = require('@renderforest/sdk-node')
13+
14+
RenderforestClient.getCompanySoundsLimited({ duration: 4 })
15+
.then(console.log) // handle the success
16+
.catch(console.error) // handle the error
17+
```
18+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-company-sounds-limited.js)
19+
20+
With authorization it's possible to fetch all sounds.
21+
22+
```js
23+
const RenderforestClient = require('@renderforest/sdk-node')
24+
25+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
26+
27+
Renderforest.getSounds({ duration: 4 })
28+
.then(console.log) // handle the success
29+
.catch(console.error) // handle the error
30+
```
31+
- The sounds will have greater or equal duration to the specified one.
32+
- **Remember** — any given value of the duration greater than 180 will be overridden by 180!
33+
34+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-sounds.js)
35+
36+
37+
### Get Recommended Sounds
38+
39+
Retrieves recommended sounds for the given template.
40+
41+
If the authorization is not present, then response limits to 5.
42+
43+
```js
44+
const RenderforestClient = require('@renderforest/sdk-node')
45+
46+
RenderforestClient.getRecommendedSoundsLimited(701, { duration: 5 })
47+
.then(console.log) // handle the success
48+
.catch(console.error) // handle the error
49+
```
50+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-recommended-sounds-limited.js)
51+
52+
With authorization it's possible to fetch all recommended sounds.
53+
54+
```js
55+
const RenderforestClient = require('@renderforest/sdk-node')
56+
57+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
58+
59+
Renderforest.getRecommendedSounds(701, { duration: 5 })
60+
.then(console.log) // handle the success
61+
.catch(console.error) // handle the error
62+
```
63+
- These sounds will have greater or equal duration to the specified one.
64+
- **Remember** — any given value of the duration greater than 180 will be overridden by 180!
65+
66+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-recommended-sounds.js)
67+
68+
**[⬆ back to the top](#sounds-api)**

docs/SUPPORTS_API.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Supports API
2+
3+
- [Add Supports Ticket](#add-supports-ticket)
4+
5+
### Add Supports Ticket
6+
7+
Creates supports ticket.
8+
```js
9+
const RenderforestClient = require('@renderforest/sdk-node')
10+
11+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
12+
13+
Renderforest.addSupportsTicket({
14+
message: 'I need to...',
15+
mailType: 'Creative team',
16+
subject: 'Some help in ..'
17+
})
18+
.then(console.log) // handle the success
19+
.catch(console.error) // handle the error
20+
```
21+
- The possible values of ticket `mailType` are: 'Sales', 'Report a bug', 'Editing process', 'Creative team', 'Other'.
22+
23+
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/supports/add-supports-ticket.js)
24+
25+
**[⬆ back to the top](#supports-api)**

0 commit comments

Comments
 (0)