-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from Kentico/Items_feed_response_fix
Add interface for DeliveryItemsFeed
- Loading branch information
Showing
6 changed files
with
57 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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.Threading.Tasks; | ||
|
||
namespace Kentico.Kontent.Delivery | ||
{ | ||
/// <summary> | ||
/// Represents a feed that can be used to retrieve content items from Kentico Kontent Delivery API in smaller batches. | ||
/// </summary> | ||
public interface IDeliveryItemsFeed | ||
{ | ||
/// <summary> | ||
/// Indicates whether there are more batches to fetch. | ||
/// </summary> | ||
bool HasMoreResults { get; } | ||
|
||
/// <summary> | ||
/// Retrieves the next feed batch if available. | ||
/// </summary> | ||
/// <returns>Instance of <see cref="DeliveryItemsFeedResponse"/> class that contains a list of content items.</returns> | ||
Task<DeliveryItemsFeedResponse> FetchNextBatchAsync(); | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
Kentico.Kontent.Delivery/StrongTyping/IDeliveryItemsFeed.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.Threading.Tasks; | ||
|
||
namespace Kentico.Kontent.Delivery | ||
{ | ||
/// <summary> | ||
/// Represents a feed that can be used to retrieve strongly typed content items from Kentico Kontent Delivery API in smaller batches. | ||
/// </summary> | ||
/// <typeparam name="T">The type of content items in the feed.</typeparam> | ||
public interface IDeliveryItemsFeed<T> | ||
{ | ||
/// <summary> | ||
/// Indicates whether there are more batches to fetch. | ||
/// </summary> | ||
bool HasMoreResults { get; } | ||
|
||
/// <summary> | ||
/// Retrieves the next feed batch if available. | ||
/// </summary> | ||
/// <returns>Instance of <see cref="DeliveryItemsFeedResponse{T}"/> class that contains a list of strongly typed content items.</returns> | ||
Task<DeliveryItemsFeedResponse<T>> FetchNextBatchAsync(); | ||
} | ||
} |