Class PaginatedAttachmentClient
- Namespace
- Crews.PlanningCenter.Api.Calendar.V2022_07_07
- Assembly
- Crews.PlanningCenter.Api.dll
Client for interacting with Attachment collection resources.
public class PaginatedAttachmentClient : PaginatedResourceClient<Attachment, AttachmentResource, AttachmentCollectionResponse, AttachmentResponse>
- Inheritance
-
PaginatedResourceClient<Attachment, AttachmentResource, AttachmentCollectionResponse, AttachmentResponse>PaginatedAttachmentClient
- Inherited Members
Constructors
PaginatedAttachmentClient(HttpClient, Uri)
Client for interacting with Attachment collection resources.
public PaginatedAttachmentClient(HttpClient httpClient, Uri uri)
Parameters
httpClientHttpClienturiUri
Methods
AddCustomParameter(string, string)
Adds a custom query parameter to the request URI.
public PaginatedAttachmentClient AddCustomParameter(string parameter, string value)
Parameters
Returns
- PaginatedAttachmentClient
The current PaginatedAttachmentClient instance.
ClearParameters()
Removes the entire query string from the request URI.
public PaginatedAttachmentClient ClearParameters()
Returns
- PaginatedAttachmentClient
The current PaginatedAttachmentClient instance.
Filter(string)
Adds a filter query parameter to the request.
public PaginatedAttachmentClient Filter(string filter)
Parameters
filterstringThe filter criteria.
Returns
- PaginatedAttachmentClient
The current PaginatedAttachmentClient instance.
Remarks
See Planning Center API documentation for details on supported filter values for this resource.
GetAsync(CancellationToken)
Fetches a paginated list of Attachment resources asynchronously.
public Task<AttachmentCollectionResponse> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<AttachmentCollectionResponse>
A task representing the asynchronous operation, containing a paginated list of Attachment resources.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
IncludeEvent()
Include related Event resources in the response.
public AttachmentClient IncludeEvent()
Returns
Offset(int)
Sets the item offset in the paginated response.
public PaginatedAttachmentClient Offset(int count)
Parameters
countintThe number of items to skip.
Returns
- PaginatedAttachmentClient
The current PaginatedAttachmentClient instance.
OrderByContentType()
Sort response items by the ContentType attribute.
public AttachmentClient OrderByContentType()
Returns
OrderByContentTypeDescending()
Sort response items by the ContentType attribute. Use reverse order.
public AttachmentClient OrderByContentTypeDescending()
Returns
OrderByCreatedAt()
Sort response items by the CreatedAt attribute.
public AttachmentClient OrderByCreatedAt()
Returns
OrderByCreatedAtDescending()
Sort response items by the CreatedAt attribute. Use reverse order.
public AttachmentClient OrderByCreatedAtDescending()
Returns
OrderByDescription()
Sort response items by the Description attribute.
public AttachmentClient OrderByDescription()
Returns
OrderByDescriptionDescending()
Sort response items by the Description attribute. Use reverse order.
public AttachmentClient OrderByDescriptionDescending()
Returns
OrderByFileSize()
Sort response items by the FileSize attribute.
public AttachmentClient OrderByFileSize()
Returns
OrderByFileSizeDescending()
Sort response items by the FileSize attribute. Use reverse order.
public AttachmentClient OrderByFileSizeDescending()
Returns
OrderByName()
Sort response items by the Name attribute.
public AttachmentClient OrderByName()
Returns
OrderByNameDescending()
Sort response items by the Name attribute. Use reverse order.
public AttachmentClient OrderByNameDescending()
Returns
OrderByUpdatedAt()
Sort response items by the UpdatedAt attribute.
public AttachmentClient OrderByUpdatedAt()
Returns
OrderByUpdatedAtDescending()
Sort response items by the UpdatedAt attribute. Use reverse order.
public AttachmentClient OrderByUpdatedAtDescending()
Returns
PerPage(int)
Sets the number of items to be returned per page in the paginated response.
public PaginatedAttachmentClient PerPage(int count)
Parameters
countintThe number of items to be returned per page.
Returns
- PaginatedAttachmentClient
The current PaginatedAttachmentClient instance.
WhereContentType(string)
Query response items by the ContentType attribute.
public AttachmentClient WhereContentType(string value)
Parameters
valuestring
Returns
WhereCreatedAt(DateTime)
Query response items by the CreatedAt attribute.
public AttachmentClient WhereCreatedAt(DateTime value)
Parameters
valueDateTime
Returns
WhereDescription(string)
Query response items by the Description attribute.
public AttachmentClient WhereDescription(string value)
Parameters
valuestring
Returns
WhereFileSize(int)
Query response items by the FileSize attribute.
public AttachmentClient WhereFileSize(int value)
Parameters
valueint
Returns
WhereName(string)
Query response items by the Name attribute.
public AttachmentClient WhereName(string value)
Parameters
valuestring
Returns
WhereUpdatedAt(DateTime)
Query response items by the UpdatedAt attribute.
public AttachmentClient WhereUpdatedAt(DateTime value)
Parameters
valueDateTime
Returns
WithId(string)
Creates a new instance of a Attachment client for a specific resource ID.
public AttachmentClient WithId(string id)
Parameters
idstringThe ID of the resource to create a client for.
Returns
- AttachmentClient
A new instance of the resource client for the specified resource ID.