forked from algolia/api-clients-automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(csharp) add support for widgets / banners in search for the csha…
…rp client fix algolia#3869
- Loading branch information
Jonas Kalmar Rønning
committed
Oct 2, 2024
1 parent
63200d1
commit 82b04e5
Showing
6 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Banner.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Algolia.Search.Models.Search; | ||
|
||
/// <summary> | ||
/// Represents a banner configured in the merchandising studio | ||
/// </summary> | ||
public class Banner | ||
{ | ||
/// <summary> | ||
/// Gets or sets image | ||
/// </summary> | ||
[JsonPropertyName("image")] | ||
public BannerImage Image { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets link | ||
/// </summary> | ||
[JsonPropertyName("link")] | ||
public BannerLink Link { get; set; } | ||
} |
22 changes: 22 additions & 0 deletions
22
clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BannerImage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Algolia.Search.Models.Search; | ||
|
||
/// <summary> | ||
/// A banner image, contains urls for the images and a title | ||
/// </summary> | ||
public class BannerImage | ||
{ | ||
/// <summary> | ||
/// Gets or sets urls | ||
/// </summary> | ||
[JsonPropertyName("urls")] | ||
public IReadOnlyCollection<BannerImageUrl> Urls { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets title | ||
/// </summary> | ||
[JsonPropertyName("title")] | ||
public string Title { get; set; } | ||
} |
15 changes: 15 additions & 0 deletions
15
clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BannerImageUrl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Algolia.Search.Models.Search; | ||
|
||
/// <summary> | ||
/// Url specified for the banner image in the merchandising studio | ||
/// </summary> | ||
public class BannerImageUrl | ||
{ | ||
/// <summary> | ||
/// Gets or sets url | ||
/// </summary> | ||
[JsonPropertyName("url")] | ||
public string Url { get; set; } | ||
} |
15 changes: 15 additions & 0 deletions
15
clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BannerLink.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Algolia.Search.Models.Search; | ||
|
||
/// <summary> | ||
/// The url specified on the banner in the merchandising studio | ||
/// </summary> | ||
public class BannerLink | ||
{ | ||
/// <summary> | ||
/// Gets or sets url | ||
/// </summary> | ||
[JsonPropertyName("url")] | ||
public string Url { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
clients/algoliasearch-client-csharp/algoliasearch/Models/Search/Widgets.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Algolia.Search.Models.Search; | ||
|
||
public class Widgets | ||
{ | ||
/// <summary> | ||
/// Gets or sets banners | ||
/// </summary> | ||
[JsonPropertyName("banners")] | ||
public IReadOnlyCollection<Banner> Banners { get; set; } | ||
} |