-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathupdate-project-data-partial.js
73 lines (70 loc) · 2.28 KB
/
update-project-data-partial.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* Copyright (c) 2018-present, Renderforest, LLC.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory.
*/
const RenderforestClient = require('../../lib/client')
const Renderforest = new RenderforestClient({ signKey: '<signKey>', clientId: -1 })
Renderforest.getProjectData(7125672)
.then((projectDataInstance) =>
projectDataInstance.setStyles({ theme: '1', transition: '2' })
.setVoiceOver({ path: 'https://example.com/voice-ower.mp3' })
.setSounds([
{
duration: 120,
id: 559,
genre: 'Rock', // optional
lowQuality: 'https://example.com/sample-low.mp3',
path: 'https://example.com/sample.mp3',
title: 'Inspiring Piano'
},
{
duration: 12,
fileSize: 198658,
id: 952626,
path: 'https://example.com/sample.mp3',
title: 'sound sample.mp3',
userId: 1469277,
voiceOver: false
}
])
.setProjectColors([
'ffffff', 'a1d4ec', '1d2e54', '61a371', 'a0b6e7', 'e0d0ef', '5c1313', 'b2e1f4', '706bb5', 'b4ddf5'
])
.pushScreen({
id: 2125620,
characterBasedDuration: true,
compositionName: '191_man_Angry_2',
duration: 5,
extraVideoSecond: 0,
iconAdjustable: 0,
gifPath: 'https://example.com/191_man_Angry_2_1.gif',
gifBigPath: 'https://example.com/191_man_Angry_2_1.gif',
gifThumbnailPath: 'https://example.com/191_man_Angry_2_n.jpg',
hidden: false,
maxDuration: 15,
order: 1900,
path: 'https://example.com/191_man_Angry_2_n.jpg',
tags: 'business, computer, chair, desk, laptop, occupation, office, worker, arms, boss, boy, businessman,chef, company, employer, professional',
title: 'Angry Office worker with arms crossed',
type: 1,
areas: [
{
id: 3562168,
cords: [656, 224, 1048, 224, 1048, 332, 656, 332],
height: 108,
order: 0,
title: 'char_Angry_2',
type: 'text',
value: '',
wordCount: 40,
width: 392
}
]
})
.removeScreen(0)
.save()
)
.catch(console.error)