Class PaginatedAttachmentClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_11_01
- 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
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.
IncludeZooms()
Include related Zooms resources in the response.
public AttachmentClient IncludeZooms()
Returns
OrderByAttachableType()
Sort response items by the AttachableType attribute.
public AttachmentClient OrderByAttachableType()
Returns
OrderByAttachableTypeDescending()
Sort response items by the AttachableType attribute. Use reverse order.
public AttachmentClient OrderByAttachableTypeDescending()
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
OrderByDeletedAt()
Sort response items by the DeletedAt attribute.
public AttachmentClient OrderByDeletedAt()
Returns
OrderByDeletedAtDescending()
Sort response items by the DeletedAt attribute. Use reverse order.
public AttachmentClient OrderByDeletedAtDescending()
Returns
OrderByFilename()
Sort response items by the Filename attribute.
public AttachmentClient OrderByFilename()
Returns
OrderByFilenameDescending()
Sort response items by the Filename attribute. Use reverse order.
public AttachmentClient OrderByFilenameDescending()
Returns
OrderByFiletype()
Sort response items by the Filetype attribute.
public AttachmentClient OrderByFiletype()
Returns
OrderByFiletypeDescending()
Sort response items by the Filetype attribute. Use reverse order.
public AttachmentClient OrderByFiletypeDescending()
Returns
OrderBySize()
Sort response items by the Size attribute.
public AttachmentClient OrderBySize()
Returns
OrderBySizeDescending()
Sort response items by the Size attribute. Use reverse order.
public AttachmentClient OrderBySizeDescending()
Returns
PostAsync(Attachment, CancellationToken)
Creates a new Attachment resource asynchronously.
public Task<AttachmentResponse> PostAsync(Attachment resource, CancellationToken cancellationToken = default)
Parameters
resourceAttachmentThe resource data to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<AttachmentResponse>
A task representing the asynchronous operation, containing the created Attachment resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
PostAsync(JsonApiDocument<AttachmentResource>, CancellationToken)
Creates a new Attachment resource asynchronously.
public Task<AttachmentResponse> PostAsync(JsonApiDocument<AttachmentResource> document, CancellationToken cancellationToken = default)
Parameters
documentJsonApiDocument<AttachmentResource>The JSON:API document to be sent in the POST request.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<AttachmentResponse>
A task representing the asynchronous operation, containing the created Attachment resource.
Exceptions
- JsonApiException
Thrown when the HTTP response indicates a failure status code.
WhereAdministratorId(int)
Query response items by the AdministratorId attribute.
public AttachmentClient WhereAdministratorId(int value)
Parameters
valueint
Returns
WhereLicensesPurchased(int)
Query response items by the LicensesPurchased attribute.
public AttachmentClient WhereLicensesPurchased(int value)
Parameters
valueint
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.