Class PagingRequest
- Namespace
- AnthropicClient.Models
- Assembly
- AnthropicClient.dll
Represents a request to page through a collection of items.
public class PagingRequest
- Inheritance
-
PagingRequest
- Inherited Members
Constructors
PagingRequest(string, string, int)
Initializes a new instance of the PagingRequest class.
public PagingRequest(string beforeId = "", string afterId = "", int limit = 20)
Parameters
beforeIdstringThe ID of the item before which to start the page.
afterIdstringThe ID of the item after which to start the page.
limitintThe maximum number of items to return in the page.
Exceptions
- ArgumentException
Thrown when both
beforeIdandafterIdare specified.- ArgumentOutOfRangeException
Thrown when
limitis less than 1 or greater than 1000.
Properties
AfterId
The ID of the item after which to start the page.
[JsonPropertyName("after_id")]
public string AfterId { get; init; }
Property Value
BeforeId
The ID of the item before which to start the page.
[JsonPropertyName("before_id")]
public string BeforeId { get; init; }
Property Value
Limit
The maximum number of items to return in the page.
public int Limit { get; init; }
Property Value
Methods
ToQueryParameters()
Converts the PagingRequest to a query string.
public string ToQueryParameters()
Returns
- string
The query string representation of the PagingRequest.