From dc695f36d52b239266ad6dcb9b25045db849e8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Z=C3=A1hora?= Date: Sat, 13 Jul 2024 02:02:07 +0200 Subject: [PATCH] CTC-2504 Add WebSpotlight samples --- .../GetWebSpotlightStatus.cs | 12 +++++++++++ .../PutWebSpotlightActivate.cs | 20 +++++++++++++++++++ .../PutWebSpotlightDeactivate.cs | 12 +++++++++++ 3 files changed, 44 insertions(+) create mode 100644 net/management-api-v2/GetWebSpotlightStatus.cs create mode 100644 net/management-api-v2/PutWebSpotlightActivate.cs create mode 100644 net/management-api-v2/PutWebSpotlightDeactivate.cs diff --git a/net/management-api-v2/GetWebSpotlightStatus.cs b/net/management-api-v2/GetWebSpotlightStatus.cs new file mode 100644 index 00000000..9f4f3613 --- /dev/null +++ b/net/management-api-v2/GetWebSpotlightStatus.cs @@ -0,0 +1,12 @@ +// DocSection: cm_api_v2_get_web_spotlight_status +// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net +using Kontent.Ai.Management; + +var client = new ManagementClient(new ManagementOptions +{ + ApiKey = "", + ProjectId = "" +}); + +var response = await client.GetWebSpotlightStatusAsync(); +// EndDocSection \ No newline at end of file diff --git a/net/management-api-v2/PutWebSpotlightActivate.cs b/net/management-api-v2/PutWebSpotlightActivate.cs new file mode 100644 index 00000000..2b05c44a --- /dev/null +++ b/net/management-api-v2/PutWebSpotlightActivate.cs @@ -0,0 +1,20 @@ +// DocSection: cm_api_v2_put_web_spotlight_activate +// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net +using Kontent.Ai.Management; + +var client = new ManagementClient(new ManagementOptions +{ + ApiKey = "", + ProjectId = "" +}); + +var reference = Reference.ById(Guid.Parse("6291c693-f6e4-4a6b-ac67-5c31c32f9388")); +// var reference = Reference.ById("my_web_root_type"); + +var model = new WebSpotlightActivateModel() +{ + RootType = reference +} + +var response = await client.ActivateWebSpotlightAsync(model); +// EndDocSection \ No newline at end of file diff --git a/net/management-api-v2/PutWebSpotlightDeactivate.cs b/net/management-api-v2/PutWebSpotlightDeactivate.cs new file mode 100644 index 00000000..833cf5c4 --- /dev/null +++ b/net/management-api-v2/PutWebSpotlightDeactivate.cs @@ -0,0 +1,12 @@ +// DocSection: cm_api_v2_put_web_spotlight_deactivate +// Tip: Find more about .NET SDKs at https://kontent.ai/learn/net +using Kontent.Ai.Management; + +var client = new ManagementClient(new ManagementOptions +{ + ApiKey = "", + ProjectId = "" +}); + +var response = await client.DeactivateWebSpotlightAsync(); +// EndDocSection \ No newline at end of file