From 99ecc3c26ec7f8d6d80a5de261ab58c1ef56b4aa Mon Sep 17 00:00:00 2001 From: zahid92 Date: Wed, 28 Feb 2024 19:36:03 +0530 Subject: [PATCH] Added isSystem for String based List labels --- src/Crowdin.Api/Labels/Label.cs | 5 ++++- src/Crowdin.Api/Labels/LabelsApiExecutor.cs | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Crowdin.Api/Labels/Label.cs b/src/Crowdin.Api/Labels/Label.cs index a5e9fc13..28c944de 100644 --- a/src/Crowdin.Api/Labels/Label.cs +++ b/src/Crowdin.Api/Labels/Label.cs @@ -1,4 +1,4 @@ - + using JetBrains.Annotations; using Newtonsoft.Json; @@ -12,5 +12,8 @@ public class Label [JsonProperty("title")] public string Title { get; set; } + + [JsonProperty("isSystem")] + public bool IsSystem { get; set; } } } \ No newline at end of file diff --git a/src/Crowdin.Api/Labels/LabelsApiExecutor.cs b/src/Crowdin.Api/Labels/LabelsApiExecutor.cs index d916381e..35c2f480 100644 --- a/src/Crowdin.Api/Labels/LabelsApiExecutor.cs +++ b/src/Crowdin.Api/Labels/LabelsApiExecutor.cs @@ -1,4 +1,4 @@ - + using System.Collections.Generic; using System.Net; using System.Threading.Tasks; @@ -30,13 +30,15 @@ public LabelsApiExecutor(ICrowdinApiClient apiClient, IJsonParser jsonParser) /// /// List labels. Documentation: /// Crowdin API + /// Crowdin String Based API /// Crowdin Enterprise API /// [PublicAPI] - public async Task> ListLabels(int projectId, int limit = 25, int offset = 0) + public async Task> ListLabels(int projectId, int limit = 25, int offset = 0, bool isSystem = false) { string url = FormUrl_Labels(projectId); IDictionary queryParams = Utils.CreateQueryParamsFromPaging(limit, offset); + queryParams["isSystem"]= isSystem ? "true" : "false"; CrowdinApiResult result = await _apiClient.SendGetRequest(url, queryParams); return _jsonParser.ParseResponseList