Created
January 9, 2016 15:59
-
-
Save markholdt/5a917dc927aa8a7ba75f to your computer and use it in GitHub Desktop.
Paging request & response example
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
[Route("/listings", "GET")] | |
public class GetListings : IReturn<GetListingsResponse> | |
{ | |
// this parameter is used for requesting a specific page | |
public int? PageNr { get; set; } | |
// other default request parameters, not needed for paging but included for illustrative purposes | |
public int? CategoryId { get; set; } | |
public int? PriceFrom { get; set; } | |
public int? PriceTo { get; set; } | |
} | |
public class GetListingsResponse | |
{ | |
public List<Listing> Result { get; set; } | |
public int TotalPageCount { get; set; } // total number of pages | |
public int CurrentPageNr { get; set; } // current page number | |
public int TotalRecords { get; set; } // total number of records | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment