-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-361) Add a way to return pagination information that SendGrid ret…
…urns in a Link' response header
- Loading branch information
Showing
6 changed files
with
151 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
namespace StrongGrid.Models | ||
{ | ||
/// <summary> | ||
/// Pagination Object. | ||
/// </summary> | ||
/// <typeparam name="T">The type of records.</typeparam> | ||
public class PaginatedResponseWithLinks<T> | ||
{ | ||
/// <summary> | ||
/// Gets or sets the information about the first page. | ||
/// </summary> | ||
public PaginationLink First { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the information about the previous page. | ||
/// </summary> | ||
public PaginationLink Previous { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the information about the next page. | ||
/// </summary> | ||
public PaginationLink Next { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the information about the last page. | ||
/// </summary> | ||
public PaginationLink Last { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the records. | ||
/// </summary> | ||
public T[] Records { 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace StrongGrid.Models | ||
{ | ||
public class PaginationLink | ||
{ | ||
public string Link { get; set; } | ||
|
||
public string Rel { get; set; } | ||
|
||
public int PageNumber { 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
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