Skip to content

Commit 43ce2f6

Browse files
Merge pull request #171 from renderforest/template-fonts
template-fonts
2 parents d56f2e1 + 2fabf84 commit 43ce2f6

22 files changed

+448
-138
lines changed

README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ Renderforest SDK for Node.js.
99

1010
Welcome to the Renderforest API! With our SDK you can use following resources:
1111

12-
* [Projects](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/PROJECTS_API.md)
13-
* [Project-data](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/project-data-api/PROJECT_DATA_API.md)
14-
- [Screens](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/project-data-api/SCREENS_API.md)
15-
- [Areas](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/project-data-api/AREAS_API.md)
16-
* [Sounds](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/SOUNDS_API.md)
17-
* [Supports](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/SUPPORTS_API.md)
18-
* [Templates](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/TEMPLATES_API.md)
19-
* [Users](https://github.com/renderforest/renderforest-sdk-node/blob/master/docs/USERS_API.md)
12+
* [Fonts](docs/FONTS.md)
13+
* [Projects](docs/PROJECTS_API.md)
14+
* [Project-data](docs/project-data-api/PROJECT_DATA_API.md)
15+
- [Screens](docs/project-data-api/SCREENS_API.md)
16+
- [Areas](docs/project-data-api/AREAS_API.md)
17+
* [Sounds](docs/SOUNDS_API.md)
18+
* [Supports](docs/SUPPORTS_API.md)
19+
* [Templates](docs/TEMPLATES_API.md)
20+
* [Users](docs/USERS_API.md)
2021

2122
#### [Renderforest SDK License Agreement](https://developers.renderforest.com/policy.html)

docs/FONTS.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Fonts API
2+
3+
- [Get Template Available Fonts](#get-template-available-fonts)
4+
5+
### Get template available fonts
6+
7+
Retrieves template available fonts.
8+
```js
9+
const RenderforestClient = require('@renderforest/sdk-node')
10+
11+
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
12+
13+
Renderforest.getTemplateAvailableFonts(1021)
14+
.then(console.log) // handle the success
15+
.catch(console.error) // handle the error
16+
```
17+
18+
[See example](/samples/fonts/get-template-available-fonts.js)
19+
20+
`getTemplateAvailabeFonts ` function returns an object containing all fonts.
21+
The returned object has `getFontById ` method which accepts `fontId` parameter.
22+
`getFontId` method returns flattened font.
23+
24+
**Be careful**: `setFonts()` project data instance setter accepts only flattened font.
25+
26+
```js
27+
const primaryFont = fonts.getFontById(256) // returns flatten font with tuned character size
28+
```
29+
30+
Now the flatten font can be used as parameter for `setFonts` setter in project data instance.
31+
32+
[See setFonts() setter in project data](/docs/project-data-api/PROJECT_DATA_API.md#set-project-fonts)
33+
34+
**[⬆ back to the top](#fonts-api)**

docs/PROJECTS_API.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Renderforest.getProjects({
3434
- The renderedQualities property is optional and present if the project is in renders queue (ongoing rend).
3535
- All the properties of `payload` object are optional.
3636

37-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/get-projects.js)
37+
[See example](/samples/projects/get-projects.js)
3838

3939

4040
### Add Project
@@ -60,7 +60,7 @@ Renderforest.addProject(701)
6060
- The "projectColors" is optional and gets value if the template has default colors. Both lego & non-lego templates might have default colors.
6161
- Both "themeVariableName" & "themeVariableValue" are optional and are added (both) if template has theme. Both lego & non-lego templates might have a theme.
6262

63-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/add-project.js)
63+
[See example](/samples/projects/add-project.js)
6464

6565

6666
### Get Trial Project
@@ -78,7 +78,7 @@ RenderforestClient.getTrialProject(701)
7878
.catch(console.error) // handle the error
7979

8080
```
81-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/get-trial-project.js)
81+
[See example](/samples/projects/get-trial-project.js)
8282

8383

8484
### Get a Specific Project
@@ -93,7 +93,7 @@ Renderforest.getProject(5000295)
9393
.then(console.log) // handle the success
9494
.catch(console.error) // handle the error
9595
```
96-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/get-project.js)
96+
[See example](/samples/projects/get-project.js)
9797

9898

9999
### Update the Project - partial update
@@ -108,7 +108,7 @@ Renderforest.updateProjectPartial(5000658, { customTitle: 'Graduation' })
108108
.then(console.log) // handle the success
109109
.catch(console.error) // handle the error
110110
```
111-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/update-project-partial.js)
111+
[See example](/samples/projects/update-project-partial.js)
112112

113113

114114
### Delete a Specific Project
@@ -124,7 +124,7 @@ Renderforest.deleteProject(5000658)
124124
.catch(console.error) // handle the error
125125

126126
```
127-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/delete-project.js)
127+
[See example](/samples/projects/delete-project.js)
128128

129129

130130
### Delete Specific Project Videos
@@ -143,7 +143,7 @@ Renderforest.deleteProjectVideos(4120385, 360)
143143
.then(console.log) // handle the success
144144
.catch(console.error) // handle the error
145145
```
146-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/delete-project-videos.js)
146+
[See example](/samples/projects/delete-project-videos.js)
147147

148148

149149
### Apply Template Preset on the Project
@@ -158,7 +158,7 @@ Renderforest.applyTemplatePresetOnProject(5000658, 55)
158158
.then(console.log) // handle the success
159159
.catch(console.error) // handle the error
160160
```
161-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/apply-template-preset-on-project.js)
161+
[See example](/samples/projects/apply-template-preset-on-project.js)
162162

163163

164164
### Duplicate the Project
@@ -173,7 +173,7 @@ Renderforest.duplicateProject(5000658)
173173
.then(console.log) // handle the success
174174
.catch(console.error) // handle the error
175175
```
176-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/duplicate-project.js)
176+
[See example](/samples/projects/duplicate-project.js)
177177

178178

179179
### Render the Project
@@ -194,7 +194,7 @@ Renderforest.renderProject(4120385, { quality: 360, watermark: 'https://example.
194194
```
195195
- The possible values of the quality are: 0, 360, 720, and 1080.
196196

197-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/projects/render-project.js)
197+
[See example](/samples/projects/render-project.js)
198198

199199

200200
### Get rendering status

docs/SOUNDS_API.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RenderforestClient.getCompanySoundsLimited({ duration: 4 })
1515
.then(console.log) // handle the success
1616
.catch(console.error) // handle the error
1717
```
18-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-company-sounds-limited.js)
18+
[See example](/samples/sounds/get-company-sounds-limited.js)
1919

2020
With authorization it's possible to fetch all sounds.
2121

@@ -31,7 +31,7 @@ Renderforest.getSounds({ duration: 4 })
3131
- The sounds will have greater or equal duration to the specified one.
3232
- **Remember** — any given value of the duration greater than 180 will be overridden by 180!
3333

34-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-sounds.js)
34+
[See example](/samples/sounds/get-sounds.js)
3535

3636

3737
### Get Recommended Sounds
@@ -47,7 +47,7 @@ RenderforestClient.getRecommendedSoundsLimited(701, { duration: 5 })
4747
.then(console.log) // handle the success
4848
.catch(console.error) // handle the error
4949
```
50-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-recommended-sounds-limited.js)
50+
[See example](/samples/sounds/get-recommended-sounds-limited.js)
5151

5252
With authorization it's possible to fetch all recommended sounds.
5353

@@ -63,6 +63,6 @@ Renderforest.getRecommendedSounds(701, { duration: 5 })
6363
- These sounds will have greater or equal duration to the specified one.
6464
- **Remember** — any given value of the duration greater than 180 will be overridden by 180!
6565

66-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/sounds/get-recommended-sounds.js)
66+
[See example](/samples/sounds/get-recommended-sounds.js)
6767

6868
**[⬆ back to the top](#sounds-api)**

docs/SUPPORTS_API.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ Renderforest.addSupportsTicket({
2020
```
2121
- The possible values of ticket `mailType` are: 'Sales', 'Report a bug', 'Editing process', 'Creative team', 'Other'.
2222

23-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/supports/add-supports-ticket.js)
23+
[See example](/samples/supports/add-supports-ticket.js)
2424

2525
**[⬆ back to the top](#supports-api)**

docs/TEMPLATES_API.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RenderforestClient.getTemplates({
2828
.then(console.log) // handle the success
2929
.catch(console.error) // handle the error
3030
```
31-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-templates.js)
31+
[See example](/samples/templates/get-templates.js)
3232

3333

3434
### Get Templates Categories
@@ -44,7 +44,7 @@ RenderforestClient.getTemplatesCategories({ language: 'en' })
4444
```
4545
- The supported language codes are: ar, de, en, es, fr, pt, ru, tr.
4646

47-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-templates-categories.js)
47+
[See example](/samples/templates/get-templates-categories.js)
4848

4949

5050
### Get a Specific Template
@@ -59,7 +59,7 @@ RenderforestClient.getTemplate(701, { language: 'en' })
5959
```
6060
- The supported language codes are: ar, de, en, es, fr, pt, ru, tr.
6161

62-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template.js)
62+
[See example](/samples/templates/get-template.js)
6363

6464

6565
### Get Color-Presets of the Template
@@ -75,7 +75,7 @@ RenderforestClient.getTemplateColorPresets(701)
7575
```
7676
- The number of color-presets is varying from template to template.
7777

78-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template-color-presets.js)
78+
[See example](/samples/templates/get-template-color-presets.js)
7979

8080

8181
### Get Pluggable-Screens of the Template
@@ -92,7 +92,7 @@ RenderforestClient.getTemplatePluggableScreens(701)
9292
- The number of pluggable-screens is varying from template to template.
9393
Pluggable-Screens are grouped by categories.
9494

95-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template-pluggable-screens.js)
95+
[See example](/samples/templates/get-template-pluggable-screens.js)
9696

9797

9898
### Get Recommended-Custom-Colors of the Template
@@ -108,7 +108,7 @@ RenderforestClient.getTemplateRecommendedCustomColors(701)
108108
```
109109
- The number of recommended-custom-colors is varying from template to template.
110110

111-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template-recommended-custom-colors.js)
111+
[See example](/samples/templates/get-template-recommended-custom-colors.js)
112112

113113

114114
### Get Template-Presets of the Template
@@ -126,7 +126,7 @@ RenderforestClient.getTemplatePresets(701)
126126
- The number of template-presets is varying from template to template.
127127
Template-presets are ready-made stories created from this template to fasten your video production.
128128

129-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template-presets.js)
129+
[See example](/samples/templates/get-template-presets.js)
130130

131131

132132
### Get SVG Content of the Template
@@ -140,7 +140,7 @@ RenderforestClient.getTemplateSVGContent(701)
140140
.catch(console.error) // handle the error
141141
```
142142

143-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template-svg-content.js)
143+
[See example](/samples/templates/get-template-svg-content.js)
144144

145145

146146
### Get Theme of the Template
@@ -155,7 +155,7 @@ RenderforestClient.getTemplateTheme(701)
155155
```
156156
- Both lego & non-lego templates might have a theme.
157157

158-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template-theme.js)
158+
[See example](/samples/templates/get-template-theme.js)
159159

160160

161161

@@ -165,12 +165,11 @@ Retrieves transitions of the template.
165165
```js
166166
const RenderforestClient = require('@renderforest/sdk-node')
167167

168-
169168
RenderforestClient.getTemplateTransitions(701)
170169
.then(console.log) // handle the success
171170
.catch(console.error) // handle the error
172171
```
173172

174-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/templates/get-template-transitions.js)
173+
[See example](/samples/templates/get-template-transitions.js)
175174

176175
**[⬆ back to the top](#templates-api)**

docs/USERS_API.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ Renderforest.getCurrentUser()
1515
.catch(console.error) // handle the error
1616
```
1717

18-
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/users/get-current-user.js)
18+
[See example](/samples/users/get-current-user.js)
1919

2020
**[⬆ back to the top](#users-api)**

docs/project-data-api/AREAS_API.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ Renderforest.getProjectData(15220886)
107107
})
108108
```
109109

110-
[See advanced example for areas](https://github.com/renderforest/renderforest-sdk-node/blob/master/samples/project-data/set-text-image-video.js)
110+
[See advanced example for areas](/samples/project-data/set-text-image-video.js)
111111

112112
**[⬆ back to the top](#areas-api)**

0 commit comments

Comments
 (0)