Skip to content

Commit

Permalink
feat(source-strings): ListStrings: add taskId param support
Browse files Browse the repository at this point in the history
  • Loading branch information
innomaxx committed Jan 17, 2025
1 parent 850315f commit b6fbae7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Crowdin.Api/SourceStrings/ISourceStringsApiExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Task<ResponseList<SourceString>> ListStrings(
int? fileId = null,
int? branchId = null,
int? directoryId = null,
int? taskId = null,
string? croql = null,
string? filter = null,
StringScope? scope = null,
Expand Down
9 changes: 6 additions & 3 deletions src/Crowdin.Api/SourceStrings/SourceStringsApiExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,17 @@ public Task<ResponseList<SourceString>> ListStrings(
int? fileId = null,
int? branchId = null,
int? directoryId = null,
int? taskId = null,
string? croql = null,
string? filter = null,
StringScope? scope = null,
IEnumerable<SortingRule>? orderBy = null)
{
return ListStrings(projectId, new StringsListParams(
denormalizePlaceholders, labelIds, fileId, branchId,
directoryId, croql, filter, scope, limit, offset, orderBy));
return ListStrings(
projectId,
new StringsListParams(
denormalizePlaceholders, labelIds, fileId, branchId,
directoryId, taskId, croql, filter, scope, limit, offset, orderBy));
}

/// <summary>
Expand Down
5 changes: 5 additions & 0 deletions src/Crowdin.Api/SourceStrings/StringsListParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class StringsListParams : IQueryParamsProvider

public int? DirectoryId { get; set; }

public int? TaskId { get; set; }

// ReSharper disable once InconsistentNaming
public string? CroQL { get; set; }

Expand All @@ -45,6 +47,7 @@ public StringsListParams(
int? fileId,
int? branchId,
int? directoryId,
int? taskId,
string? croql,
string? filter,
StringScope? scope,
Expand All @@ -57,6 +60,7 @@ public StringsListParams(
FileId = fileId;
BranchId = branchId;
DirectoryId = directoryId;
TaskId = taskId;
CroQL = croql;
Filter = filter;
Scope = scope;
Expand All @@ -75,6 +79,7 @@ public IDictionary<string, string> ToQueryParams()
queryParams.AddParamIfPresent("fileId", FileId);
queryParams.AddParamIfPresent("branchId", BranchId);
queryParams.AddParamIfPresent("directoryId", DirectoryId);
queryParams.AddParamIfPresent("taskId", TaskId);
queryParams.AddParamIfPresent("croql", CroQL);
queryParams.AddParamIfPresent("filter", Filter);
queryParams.AddDescriptionEnumValueIfPresent("scope", Scope);
Expand Down

0 comments on commit b6fbae7

Please sign in to comment.