diff --git a/src/Meilisearch/TasksResults.cs b/src/Meilisearch/TasksResults.cs
index 8b0601d3..680c803a 100644
--- a/src/Meilisearch/TasksResults.cs
+++ b/src/Meilisearch/TasksResults.cs
@@ -9,11 +9,12 @@ namespace Meilisearch
/// Type of the Meilisearch server object. Ex: keys, indexes, ...
public class TasksResults : Result
{
- public TasksResults(T results, int? limit, int? from, int? next)
+ public TasksResults(T results, int? limit, int? from, int? next, int? total)
: base(results, limit)
{
From = from;
Next = next;
+ Total = total;
}
///
@@ -25,5 +26,10 @@ public TasksResults(T results, int? limit, int? from, int? next)
/// Gets next size.
///
public int? Next { get; }
+
+ ///
+ /// Gets total number of tasks.
+ ///
+ public int? Total { get; }
}
}
diff --git a/tests/Meilisearch.Tests/Meilisearch.Tests.csproj b/tests/Meilisearch.Tests/Meilisearch.Tests.csproj
index 127720f0..fc950cca 100644
--- a/tests/Meilisearch.Tests/Meilisearch.Tests.csproj
+++ b/tests/Meilisearch.Tests/Meilisearch.Tests.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/tests/Meilisearch.Tests/TaskInfoTests.cs b/tests/Meilisearch.Tests/TaskInfoTests.cs
index f82cb5cf..3f1f4fc1 100644
--- a/tests/Meilisearch.Tests/TaskInfoTests.cs
+++ b/tests/Meilisearch.Tests/TaskInfoTests.cs
@@ -68,6 +68,7 @@ public async Task GetMultipleTaskInfoWithQueryParameters()
var taskResponse = await _index.GetTasksAsync(new TasksQuery { Limit = 1, IndexUids = new List { _index.Uid } });
taskResponse.Results.Count().Should().BeGreaterOrEqualTo(1);
+ taskResponse.Total.Should().BeGreaterThan(0);
}
[Fact]