From 4e81512c6f719e021a9ee6bd8f18c0ebb4dc05c1 Mon Sep 17 00:00:00 2001
From: cairnsj <51908793+cairnsj@users.noreply.github.com>
Date: Tue, 19 Sep 2023 16:16:33 +0100
Subject: [PATCH 1/2] Update Childrens-Social-Care-CPD.csproj
---
Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj b/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj
index b7c18664..8f98986c 100644
--- a/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj
+++ b/Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj
@@ -13,7 +13,7 @@
-
+
From 5f58006e5e887193eb75a89e4f63fd0cde7cdfda Mon Sep 17 00:00:00 2001
From: cairnsj <51908793+cairnsj@users.noreply.github.com>
Date: Wed, 20 Sep 2023 08:21:58 +0100
Subject: [PATCH 2/2] Upgrade the Contentful SDK package
---
.../Childrens-Social-Care-CPD-Tests.csproj | 1 -
.../Contentful/CpdContentfulClientTests.cs | 20 +++++++++++++++++++
.../Contentful/CpdContentfulClient.cs | 10 ++++++++++
3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/Childrens-Social-Care-CPD-Tests/Childrens-Social-Care-CPD-Tests.csproj b/Childrens-Social-Care-CPD-Tests/Childrens-Social-Care-CPD-Tests.csproj
index ac36fb2b..e030c85d 100644
--- a/Childrens-Social-Care-CPD-Tests/Childrens-Social-Care-CPD-Tests.csproj
+++ b/Childrens-Social-Care-CPD-Tests/Childrens-Social-Care-CPD-Tests.csproj
@@ -8,7 +8,6 @@
-
diff --git a/Childrens-Social-Care-CPD-Tests/Contentful/CpdContentfulClientTests.cs b/Childrens-Social-Care-CPD-Tests/Contentful/CpdContentfulClientTests.cs
index 3b7dfd82..799066d8 100644
--- a/Childrens-Social-Care-CPD-Tests/Contentful/CpdContentfulClientTests.cs
+++ b/Childrens-Social-Care-CPD-Tests/Contentful/CpdContentfulClientTests.cs
@@ -366,5 +366,25 @@ public void Calls_Base_SyncNextResult()
_contentfulClient.Received().SyncNextResult(Arg.Any(), default);
}
+ [Test]
+ public void Calls_Base_GetTag()
+ {
+ // act
+ _cpdClient.GetTag(string.Empty, default);
+
+ // assert
+ _contentfulClient.Received().GetTag(Arg.Any(), default);
+ }
+
+ [Test]
+ public void Calls_Base_GetTags()
+ {
+ // act
+ _cpdClient.GetTags(string.Empty, default);
+
+ // assert
+ _contentfulClient.Received().GetTags(Arg.Any(), default);
+ }
+
#endregion
}
diff --git a/Childrens-Social-Care-CPD/Contentful/CpdContentfulClient.cs b/Childrens-Social-Care-CPD/Contentful/CpdContentfulClient.cs
index 4808f57e..a4b045bc 100644
--- a/Childrens-Social-Care-CPD/Contentful/CpdContentfulClient.cs
+++ b/Childrens-Social-Care-CPD/Contentful/CpdContentfulClient.cs
@@ -146,6 +146,16 @@ public Task GetSpace(CancellationToken cancellationToken = default)
return _client.GetSpace(cancellationToken);
}
+ public Task GetTag(string tagId, CancellationToken cancellationToken = default)
+ {
+ return _client.GetTag(tagId, cancellationToken);
+ }
+
+ public Task> GetTags(string queryString = "", CancellationToken cancellationToken = default)
+ {
+ return _client.GetTags(queryString, cancellationToken);
+ }
+
public Task SyncInitial(SyncType syncType = SyncType.All, string contentTypeId = "", CancellationToken cancellationToken = default, int? limit = null)
{
return _client.SyncInitial(syncType, contentTypeId, cancellationToken, limit);