Skip to content

Commit 184d633

Browse files
Merge pull request #155 from renderforest/update-get-projects-params
Update get projects params
2 parents 3dae667 + 10adb53 commit 184d633

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,18 @@ const renderforest = new Renderforest({ signKey: '<signKey>', clientId: -1 })
9090

9191
const payload = {
9292
limit: 2,
93-
offset: 10
93+
offset: 10,
94+
includeApiProjects: false,
95+
order: 'DESC', // possible options: 'DESC', 'ASC'
96+
orderBy: 'order', // possible options: 'order', 'date'
97+
search: '' // get projects with specified title
9498
}
9599
renderforest.getProjects(payload)
96100
.then(console.log) // handle the success
97101
.catch(console.error) // handle the error
98102
```
99103
- The renderedQualities property is optional and present if the project is in renders queue (ongoing rend).
104+
- All the properties of `payload` object are optional.
100105

101106
[See example](https://github.com/renderforest/renderforest-sdk-node/blob/master/examples/projects/get-projects.js)
102107

examples/projects/get-projects.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ const renderforest = new Renderforest({ signKey: '<signKey>', clientId: -1 })
1212

1313
const payload = {
1414
limit: 2,
15-
offset: 10
15+
offset: 10,
16+
includeApiProjects: false,
17+
order: 'DESC',
18+
orderBy: 'order',
19+
search: ''
1620
}
1721
renderforest.getProjects(payload)
1822
.then(console.log) // handle the success

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@renderforest/sdk-node",
33
"description": "Renderforest SDK for Node.js",
4-
"version": "0.3.9",
4+
"version": "0.3.10",
55
"author": "RenderForest LLC",
66
"bugs": {
77
"url": "https://github.com/renderforest/renderforest-sdk-node/issues"

src/lib/resources/projects.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class Projects {
1919
* @description Get All Projects.
2020
*/
2121
static getProjects (payload) {
22-
const qs = Params.destructParams(payload, ['limit', 'offset'])
22+
const qs = Params.destructParams(payload,
23+
['limit', 'offset', 'includeApiProjects', 'order', 'orderBy', 'search'])
2324

2425
const options = {
2526
endpoint: `${API_PREFIX}/projects`,

0 commit comments

Comments
 (0)