Class PaginatedAttachmentClient
- Namespace
- Crews.PlanningCenter.Api.Services.V2018_08_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
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.
IncludeZooms()
Include related Zooms resources in the response.
public AttachmentClient IncludeZooms()
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.
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
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.
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
WhereAttachableType(string)
Query response items by the AttachableType attribute.
public AttachmentClient WhereAttachableType(string value)
Parameters
valuestring
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.