Skip to content

Commit

Permalink
fix: added recursion paramenter (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ authored Sep 2, 2021
1 parent 52421c3 commit dbb5f69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@crowdin/crowdin-api-client",
"version": "1.11.5",
"version": "1.11.6",
"description": "JavaScript library for Crowdin API v2.",
"main": "out/index.js",
"types": "out/index.d.ts",
Expand Down
3 changes: 3 additions & 0 deletions src/sourceFiles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class SourceFiles extends CrowdinApi {
* @param limit maximum number of items to retrieve (default 25)
* @param offset starting offset in the collection (default 0)
* @param filter use to filter directories by name
* @param recursion use to list directories recursively (works only when directoryId or branchId parameter is specified)
*/
listProjectDirectories(
projectId: number,
Expand All @@ -77,11 +78,13 @@ export class SourceFiles extends CrowdinApi {
limit?: number,
offset?: number,
filter?: string,
recursion?: string,
): Promise<ResponseList<SourceFilesModel.Directory>> {
let url = `${this.url}/projects/${projectId}/directories`;
url = this.addQueryParam(url, 'branchId', branchId);
url = this.addQueryParam(url, 'directoryId', directoryId);
url = this.addQueryParam(url, 'filter', filter);
url = this.addQueryParam(url, 'recursion', recursion);
return this.getList(url, limit, offset);
}

Expand Down

0 comments on commit dbb5f69

Please sign in to comment.