Skip to content

Commit c980beb

Browse files
Merge pull request #52 from renderforest/implement-examples-for-sounds-api
Implement examples for sounds api
2 parents 5154569 + 76a2f20 commit c980beb

File tree

4 files changed

+72
-0
lines changed

4 files changed

+72
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Copyright (c) 2018-present, Renderforest, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the
6+
* LICENSE file in the root directory.
7+
*/
8+
9+
const Renderforest = require('../../src/lib/renderforest')
10+
11+
const payload = {
12+
duration: 4
13+
}
14+
Renderforest.getCompanySoundsLimited(payload)
15+
.then(console.log) // handle the success
16+
.catch(console.error) // handle the error
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Copyright (c) 2018-present, Renderforest, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the
6+
* LICENSE file in the root directory.
7+
*/
8+
9+
const Renderforest = require('../../src/lib/renderforest')
10+
11+
const payload = {
12+
templateId: 701,
13+
duration: 10
14+
}
15+
Renderforest.getRecommendedSoundsLimited(payload)
16+
.then(console.log) // handle the success
17+
.catch(console.error) // handle the error
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Copyright (c) 2018-present, Renderforest, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the
6+
* LICENSE file in the root directory.
7+
*/
8+
9+
const Renderforest = require('../../src/lib/renderforest')
10+
11+
const options = { signKey: 'mock-signKey', clientId: -1 }
12+
const renderforest = new Renderforest(options)
13+
14+
const payload = {
15+
templateId: 701,
16+
duration: 10
17+
}
18+
renderforest.getRecommendedSounds(payload)
19+
.then(console.log) // handle the success
20+
.catch(console.error) // handle the error

examples/sounds/get-sounds.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) 2018-present, Renderforest, LLC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the
6+
* LICENSE file in the root directory.
7+
*/
8+
9+
const Renderforest = require('../../src/lib/renderforest')
10+
11+
const options = { signKey: 'mock-signKey', clientId: -1 }
12+
const renderforest = new Renderforest(options)
13+
14+
const payload = {
15+
duration: 4
16+
}
17+
renderforest.getSounds(payload)
18+
.then(console.log) // handle the success
19+
.catch(console.error) // handle the error

0 commit comments

Comments
 (0)